• renkessler

    (@renkessler)


    This morning I observed a behavior I have never seen before. A -1 is being appended to the file name. For instance, a file called MY_FILE.JPG uploads as MY_FILE-1.JPG.

    I can understand and expect this if the uploaded file had the same name as another in the folder, but this is not the case. All my filenames are unique. Now each uploaded to a particular folder are behaving this way. I need to be in charge of my file names and need to make this behavior go away.

    Can you help?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter renkessler

    (@renkessler)

    P.S. I performed a database reset hoping that might help, but it did not.

    Plugin Author AlanP57

    (@alanp57)

    Media Library Folders makes use of WordPress’ wp_unique_filename function that checks the destination folder and determines if the file name needs to be modified. I use Media Library Folders on a daily basis and it does not modify a file name unless there is a existing file with the same name in the destination folder. You should check to see if there is already a file with the same name in the folder.

    Thread Starter renkessler

    (@renkessler)

    Thanks you for your response, but I have checked and double checked for duplicate file names. These are photos of people, each one is unique, so its name reflects who the person is.

    There are a few duplicates, so I have appended a -2 to that file to prevent what you are suggesting, so I can maintain unique filenames. If John Doe has two photos, the first is JOHN_DOE.jpg and the second is JOHN_DOE-2.jpg. If I do that today the new file would be JOHN_DOE-2-1.jpg.

    Thread Starter renkessler

    (@renkessler)

    P.S. It is only happening in one folder, not all folders. Is it possible that these filenames are being duplicated somewhere and they are hidden? How can I check for this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Upload appends a number to filename’ is closed to new replies.