Last modified: 2012-12-23 00:25:16 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T36703, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34703 - Unable to change file extension while uploading file
Unable to change file extension while uploading file
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
UploadWizard (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-25 09:09 UTC by Liangent
Modified: 2012-12-23 00:25 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Liangent 2012-02-25 09:09:26 UTC
At least changing extension between "compatible ones" (such as .JPG <-> .jpg; .jpg <-> .jpeg) should be allowed.
Comment 1 Mark Holmquist 2012-05-11 18:42:47 UTC
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?
Comment 2 Marcin Cieślak 2012-08-05 12:35:55 UTC
Well, not really.

I uploaded recently IMG_6152.JPG to become

https://commons.wikimedia.org/wiki/File:Lower_St_Francesco_Basilica_in_Assisi_-_Interior.JPG

I would prefer to be able to change

IMG_6152.JPG  to "Lower St Francesco Basilica in Assisi - Interior.jpeg" in the process.
Comment 3 Mark Holmquist 2012-08-06 16:38:14 UTC
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.
Comment 4 Marcin Cieślak 2012-08-07 19:47:34 UTC
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?
Comment 5 Mark Holmquist 2012-08-07 19:51:51 UTC
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.

Thoughts?

(also, I'm not currently working on this, but I might during the next UW sprint, which is coming up soonish)
Comment 6 Marcin Cieślak 2012-08-07 20:08:30 UTC
We already have http://www.mediawiki.org/wiki/Manual:$wgFileExtensions
plus we have also a pretty complex MIME/content type detection mechanism (see
also http://www.mediawiki.org/wiki/File_upload)

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
fixed?).
Comment 7 Mark Holmquist 2012-08-07 20:13:15 UTC
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'.
Comment 8 Marek Blahuš 2012-12-23 00:25:16 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links