Support » Requests and Feedback » Uploaded Pics File Name

  • I have done some searching, didnt find anything that talked about this issue, though I have to doubt I am the first one to notice it.

    I have started using image uploads in my posts. It’s easy enough, might as well. But while I was giving my site a once over, I noticed a pic that did not belong where it was. After a few moments, I made the following realization…
    The pic that was wrong, had the same name as another pic that was newly uploaded.
    I get most of my pics from my own collection, from my digital camera pics. So I upload pics named PIC0001.JPG or PIC0006.JPG, I never change the names.
    It just so happened that I uploaded 2 files named PIC0008.JPG in this month ( April ). So it would appear that when I uploaded the 2nd PIC0008, it replaced the first one I had previously uploaded. This wouldnt have been a problem if I had done this in different months, but as luck would have it, they were in the same month.

    This might be an unintended feature, I dont know.

    I might suggest simply renaming the files as they are uploaded. Change the file name to the timestamp, this way they are all unique. Maybe if I get ambitious I will pour through the upload functions and make that hack myself. If anyone shows any interest, I can post back with changes.



Viewing 2 replies - 1 through 2 (of 2 total)
  • Agreed. I just started running into this. I saw slightly different behavior. now instead of the old file being overwritten, it just won’t allow me to upload a new image with the same filename, and keeps showing the old image. Would love to see this bug fixed. Thanks!

    I just got around to checking more into this. I am currently on WP v 2.2. The upload functionality is in wp-includes/functions-post.php in the wp_upload_bits(). It was then I noticed that this issue has been addressed. Now, if you upload a file with the same name as a previously uploaded file ( in the same month ), it renames the new upload.
    One June 3 you upload FILE.ext
    it gets put into

    Later on June 15 you upload another ( different contents ) FILE.ext
    this file is put into

    This solution works for me.

    Thanks devs.


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Uploaded Pics File Name’ is closed to new replies.