I think I found a bug in the file upload feature of WordPress 1.5. I uploaded an image called redandblue.gif. I had forgotten to size the image to fit and so uploaded the image again at the proper size. WordPress gave me the following message.
Filename ‘/tmp/phpbPjD8d’ moved to ‘/wp-content/redandblue_01.gif - redandblue_01.gif’
Confirm or rename:
Alternate name: redandblue_01.gif
I then selected Rename. The next message was
Your file redandblue01.gif was uploaded successfully!
Here’s the code to display it:
<img src=”http://www.bloggingpro.com/wp-content/redandblue01.gif” alt=”" />
No, the new filename was redandblue_01.gif with the underscore.
Do you like this article? Submit it to Blogosphere News!
10 Responses
mac
February 16th, 2005 at 9:48 pm
1i am using the jan 30th build and my upload doesn’t happen to work either, it uploads, just doesn’t post right
John
February 16th, 2005 at 9:59 pm
2I’m using the official 1.5 release.
Tom Hanna
February 16th, 2005 at 11:50 pm
3I am running the January 25 build and had the exact same problem. Easy enough to work around by adding the underscore, but still odd. Other than that the Jan. 25 build is running so smoothly I’m afraid to upgrade to the “official” 1.5.
Johnny
February 17th, 2005 at 5:08 am
4It always removes the underscores on the file names and the file names it gives you in the links have been fine for me so far.
John
February 17th, 2005 at 7:12 am
5Tom, you shouldn’t have a problem upgrading. I haven’t seen any other problems so far.
Johnny, the underscored file name is the one that exists. The one without the underscore does not exist on the server. I’m only speaking of 1.5 though.
Paul
February 17th, 2005 at 7:45 am
6Didn’t it do that in 1.2.2 as well? I thought it was markdown or something that was getting in the way.
John
February 17th, 2005 at 11:54 am
7I don’t know. I don’t think I have ever tried to upload the same image twice with the same name before.
Dougal Campbell
February 17th, 2005 at 12:59 pm
8Huh, it didn’t do that to me. It told me this:
There is some filename cleaning that occurs in upload.php, but it specifically allows the underscore…. In fact, looking at the code, I’m not sure how the underscore could be getting stripped out. Funky.
You’re positive that you don’t have an old copy of upload.php?
John
February 17th, 2005 at 4:54 pm
9I’m not talking about the initial upload. It’s when you try to upload a file by the same name as a previously uploaded file.
chubby land tgp
February 24th, 2005 at 4:46 pm
10Yeah, but we all know that GW is an idiot.