You are here: TWiki> Codev Web>UppercaseAttachments (2005-02-15, SamHasler)
Tags:
create new tag
, view all tags
A small point:

If you have an attachment with a GIF, JPG, or JPEG extension (not gif, jpg, or jpeg), the create link at bottom of topic check box does not behave properly. Many Windows clients will have digital camera pictures, etc. that have JPG instead of jpg. Also, the text at the bottom of the upload template makes reference to GIF and JPG in upper case, so I'd think this should work.

The fix is pretty easy. In upload (actually, upload.pl in my installation) there is a function named addLinkToEndOfTopic where there is the line:

    if( $fileName =~ /\.(gif|jpg|jpeg)$/ ) {

This should be:

    if( $fileName =~ /\.(gif|jpg|jpeg)$/i ) {

-- AlWilliams - 26 Sep 2000

Fixed and commited to TWikiAlphaRelease. At the same time, added file type png.

    if( $fileName =~ /\.(gif|jpg|jpeg|png)$/i ) {

-- PeterThoeny - 26 Sep 2000

Topic revision: r3 - 2005-02-15 - 01:32:58 - SamHasler
 
TWIKI.NET
This site is powered by the TWiki collaboration platform
Ideas, requests, problems regarding TWiki? Send feedback
Copyright © 1999-2009 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.