UploadWizard, unlike Special:Upload, does not let you enter the full file name by hand (only the part before extension). As many cameras produce files with uppercase .JPG extension, and many editors prefer lowercase .jpg and would prefer to upload them that way, we should normalize this automatically.
- Mentioned In
- T224653: Keep original ogv file type while uploading video file with standard Upload wizard in Commons
T213484: Normalize file extensions (capital vs small letters; jpg vs jpeg) for new uploads on Commons
T42326: File extension letter case treatment should be unified on Commons
T144593: File extension changes automatically while moving ogg audio file on Commons, caused by a gadget
- Mentioned Here
- T34660: File extensions for the same file type should not allow variations of a file name (File:X.jpg, File:X.jpeg, File:X.JPG should all refer to the same file)
Something tells me this would be more easily, and more reliably, accomplished on the client's side before the upload process is initiated....why would a user need to change the file extension only after choosing the file?
Well, not really.
I uploaded recently IMG_6152.JPG to become
I would prefer to be able to change
IMG_6152.JPG to "Lower St Francesco Basilica in Assisi - Interior.jpeg" in the process.
OK, that makes some sense. So maybe having arrays of names that are compatible with each other, then offering to switch between them (dropdown after the filename field?) during the details step. I'll see what I can do.
Thanks for taking this up.
I would say the dropdown is an overkill.
Maybe just extension added at the end of the filename with the dot. However, it might be difficult to determine whether the intention was to add an extension or some dotted segment (some.file.name - do we accept this?).
Maybe if the filename ends with . + one of the allowed extensions, it is left as-is?
Hm. A big concern of mine is that less-experienced users might see an error message like "incompatible filetype" and not know what to do. For those users, it would almost certainly be nicer to not even allow the mistakes that might cause the error. We already have plenty of confusing error messages in UW, I'm not about to add another one!
The more I think about this, the more I think it might be better to solve this problem with a server-side configuration setting--let the site admins specify that they want all file extensions (upper|lower)case, and then perform that operation on the client-side before upload. Maybe that's the way to solve this, because there's no burden on the user whatsoever, and it would make things look a lot more uniform.
(also, I'm not currently working on this, but I might during the next UW sprint, which is coming up soonish)
We already have http://www.mediawiki.org/wiki/Manual:$wgFileExtensions
plus we have also a pretty complex MIME/content type detection mechanism (see
some.file -> uploaded as (autodetected), add default extension
file.jpg -> uploaded as the JPEG file, keep JPG extension
file.jpeg -> uploaded as the JPEG file, keep JPEG extension
file.svg -> uploaded as the SVG file, keep SVG extension
But there is a problem too, suppose I want to upload today
some.file.webm -> upload as (autodected), I will probably get an error
but once bug 30653 is fixed, it will become:
some.file.webm -> upload as WebM file, use .webm extension
do you think this is too confusing?
(however, to add some confusion, there is bug 38927 as well, did bug 30653 got
I don't understand what any of that has to do with this.
The solution I just suggested would not affect anything like what files you could/couldn't upload, it would just be "if the file extension (the string after the last '.' in the filename) is upper case, make it lower case". That's the only thing I think we need, plus another parallel solution for making it upper case. Would that be enough?
We could also add a config option for funneling, e.g., 'jpeg' -> 'jpg'.
I have pointed to a related problem like Marcin Cieślak (my camera generates .JPG files and UW does not allow me to normalize this to .jpg) in bug 40326. That bug, however, is receiving a treatment somewhat different from what I originally wished.
I am fine with Mark Holmquist's solution, because I do not see any rationale for which someone would might like having a file with extensions like .JpG, .Jpg or even .JPG, if we all agree that .jpg is the normalized letter case (and perhaps even spelling – cf. .jpeg and its variants).
Furthermore, the discussion at bug 40326 reveals that there actually already exists the practice of promoting a "normalized" extension, which is .jpg in this case. Therefore, the solution proposed by Mark Holmquist would actually resolve what bug 40326 was in fact originally about.
I am glad that somebody else in concerned with this as well and wants to do something abou it, and I hope that things will go on rolling in the right direction.
2.5 years since last post and I am still forced to upload images with names such as https://commons.wikimedia.org/wiki/File:Brno,_Dominik%C3%A1nsk%C3%A1,_odlo%C5%BEen%C3%A1_uli%C4%8Dn%C3%AD_cedule.JPG – which confuses users of those images who need to pay attention to the extension's letter case – only because my camera names them "P1550467.JPG" and Upload Wizard does not allow me to change the extension :-(
I do not want to touch the files in my archives (or make an extra copy, also because archives can be on a read-only file system) just for the purpose of uploading them to Wikimedia Commons. As @saper pointed out, splitting the renaming process into two places does not make things easier. And knowing that with each upload I spoil others' work by unwillingly producing imperfect outcome makes me less keen on contributing multimedia to Wikimedia Commons.
Following shows the distribution of JPEG file extensions on Commons as of today:
Does supporting this mishmash do any good to content reusers, e.g. Wikipedia editors who use our files?