I'm working on modernizing Rosetta Code's infrastructure. Starting with communications. Please accept this time-limited open invite to RC's Slack.. --Michael Mol (talk) 20:59, 30 May 2020 (UTC)

User talk:Short Circuit/Image Upload problem

From Rosetta Code

Image Upload problem?[edit]

I tried to upload an image via the upload file link tonight. I created a .png and attempted to select it from the browse sourcefile name and got "Permitted file types: png, gif, jpeg, svg.". I tried creating a .jpg version using a different editor and again the same thing happened. I simplified the file name and also relocated the file to shorten the folder/path name. Nothing worked. I'm not sure what's going on as I've uploaded files before. --Dgamey 04:04, 5 July 2011 (UTC)
.jpeg will work, .jpg won't. .jpg is the format that just about every image spammer has been using. .jpeg is functionally the same; just rename a .jpg file to .jpeg, and it will work fine. --Michael Mol 04:59, 5 July 2011 (UTC)
Neither .png nor .jpeg work. Also, I can't type the filename into the Source filename field (not sure if that is significant). --Dgamey 05:30, 5 July 2011 (UTC)
I wonder if perhaps there's a case-sensitivity issue going on. Does the file extension happen to be in all-caps, rather than lower-case? By default, Windows preserves case, but does case-insensitive matching. On the server side, I have file extensions specified in all lower-case. I don't have time to dig into the code until later this week at earliest, but having enough information about how and where, exactly, the error conditions occur will help reduce the time and extent of munging the source on the server. --Michael Mol 15:34, 5 July 2011 (UTC)
I renamed them to lowercase early on. Also, the same file worked with IE9 --Dgamey 01:29, 6 July 2011 (UTC)
Odd, I see two uploads after this problem occurred for me and the problem just reoccurred as well. Okay it seems to be something with FF. I just got IE9 to upload.

--Dgamey 12:40, 5 July 2011 (UTC)

I can explain the unable-to-type issue. FireFox, since somewhere prior to 3.6, disallows manual typing or filling out of the upload path field as a hedge against scripts and malware using it to steal files from your computer. With Firefox, you must use the upload dialog (it'll pop up when you click on the upload field). --Michael Mol 13:06, 5 July 2011 (UTC)
As for .png and .jpeg not working...My hunch is that you don't have Windows Explorer configured to show file extensions. If you don't, then trying to change file extensions through Windows Explorer won't have the desired effect. (I.e. if you tried to rename a file to a .jpeg extension, you might wind up with "some_file_name.jpeg.jpg" rather than "some_file_name.jpeg". these instructions might help with that. (There's a way to do it per-folder, rather than system-wide, but I don't have a Windows box handy to remind myself of the exact steps.) --Michael Mol 13:06, 5 July 2011 (UTC)
Thanks. Windoze appears to have reset my advanced options as this is *always* how I show files and I have done this before. I suspect a recent update is responsible. --Dgamey 13:33, 5 July 2011 (UTC)
FYI. Still there appears to be a FF5.0 problem. I fixed Win Explorer and see extensions but the file name doesn't populate the form. Others may see this. I'll try playing with it later. If needed I have a workaround. --Dgamey 13:48, 5 July 2011 (UTC)
IE9 won't upload GIF/gif (GIF89a) with message "File extension does not match MIME type." I tried uploading an animated gif w/o luck. FF5 still not working either --Dgamey 05:04, 6 July 2011 (UTC)
Can you zip up the files in question and email them to me? --Michael Mol 12:29, 6 July 2011 (UTC)
On the way --Dgamey 14:14, 6 July 2011 (UTC)
Mwn3d seems to have figured it out. It appears to be a combination of issues with FF5 and bugs in this version of MediaWiki. --Michael Mol 15:39, 6 July 2011 (UTC)
It's not just Firefox. I'm unable to update my user avatar via Opera. Tried a few weeks ago (around the time of this conv.); tried just now, still no dice. -- Erik Siers 21:39, 7 August 2011 (UTC)
Sigh...I've been blocked on doing a MW upgrade for a couple months, now, but I'll try to get it done next weekend. We'll have to see if that fixes it. --Michael Mol 21:44, 7 August 2011 (UTC)
I'm having the same problem. I created an AutoHotkey implementation of the Brownian_tree task, but the output png file won't upload :( I have uploaded it to my AutoHotkey.net account here, for now I guess I'll just link to that. --Crazyfirex 21:59, 30 September 2011 (UTC)
I'm halfway through doing an upgrade, but I'm having trouble getting squid configured properly. Once it's done, I'm hoping this resolves these issues. --Michael Mol 11:28, 1 October 2011 (UTC)
Any update on this? Just tried updating my user avatar again, and got the same "fun" error message:
".jpg" is not a permitted file type. Permitted file types are png, gif, jpeg, svg.
I also tried it as .jpeg, and then with no extension. Tried uploading a PNG; got the "File extension does not match MIME type" error. -- Erik Siers 09:02, 16 October 2011 (UTC)
I still can't upload .png files. Perhaps the problem is they are created with GDI+ ... I guess I'll use imgur or something :( --Crazyfirex 02:27, 19 November 2011 (UTC)
I try to upload a PNG image (as output of a code), at http://rosettacode.org/wiki/Special:Upload and the errors I received include:
Could not store file "/tmp/phpxGxYrX" at "mwstore://local-backend/local-public/8/83/DrawSphere.png".
Could not delete lock file for "mwstore://local-backend/local-public/archive/8/83".
Could not delete lock file for "mwstore://local-backend/local-public/8/83".
I think this is a MediaWiki problem (maybe after the whole wiki changed). --Simple9371 (talk) 12:50, 19 July 2018 (UTC)