File upload - does not allow a document with the same name as one already saved

By: Heather Pearse | Asked: 12/11/2023
ForumsCategory: General questionsFile upload - does not allow a document with the same name as one already saved
Heather Pearse asked 4 months ago

Our users will typically upload 4 to 5 documents and they may have file names that others have used before. These would be generic names like "Resume.pdf". How do we ensure that a duplicate file name can be submitted? At the moment these errors are not allowing form submission.

We will email the documents on submission and could delete them from our media. I have set "delete files after submission to "yes", but still get an error when submitting a document with a previously used name.

Help would be most appreciated!  

Rob LeVineRob LeVine replied 4 months ago

What exactly is the error you're getting? I just set up a simple form with a file upload field, uploaded xyz.pdf, submitted, and then opened the form again for a new entry, uploaded xyz.pdf, and submitted successfully.

Heather Pearse replied 4 months ago

Hi, I appreciate your reply and test. The error I get is "The file you are trying to upload already exists".
I need to get the scenario that you did in your test. I don't know where I am wrong or how to fix it. Please help further.

Heather Pearse replied 4 months ago

I created a new simple form with the File upload field and got the same error when trying to upload a file for the second time. I hope there is an easy and obvious fix. Thanks!

Rob LeVineRob LeVine replied 4 months ago

I got nuthin'. I looked on my server and the first file is saved as xyz.pdf and the next is xyz-1.pdf. I don't know why your setup would be any different. My suggestions are to: 1. If you have any other, different servers try the same test there. 2. Contact Formidable support, though they might tell you it's a PHP/server issue.

Heather Pearse replied 4 months ago

I so appreciate your reply! I will investigate that further. All the best.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right