Prevent duplicate file uploads within the same submission

  • Adam_LaRosa
    Asked on March 21, 2025 at 1:09 PM

    Is there any way to prevent a user from uploading the same picture twice in a particular submission? Our previous survey provider allowed us to write a custom javascript that stored the file names in an array through out the form with a condition to through an exception when a previously used filename was discovered. Are there any work arounds for this or does JotForm offer customizable Javascript that we could leverage to accomplish similar?

  • Joseph Christian JotForm Support
    Replied on March 21, 2025 at 2:00 PM

    Hi Adam,

    Thanks for reaching out to Jotform Support. I’ll need a bit of time to look into this. I’ll get back to you as soon as I can.

    Thanks for your patience, we appreciate it.

  • Joseph Christian JotForm Support
    Replied on March 21, 2025 at 2:36 PM

    Hi Adam,

    Unfortunately, it's currently not possible to add JavaScript directly to the form for security reasons. Also, I tested this, and Jotform automatically appends a random number to the file name when the same file is uploaded in either the same File Upload field or a different one. Checkout my screencast below to see my results:

    Prevent duplicate file uploads within the same submission Image 1 Screenshot 20 In this case, preventing users from uploading the same files twice in the same form isn't possible at the moment. While the feature you’re looking for isn’t currently available at Jotform right now, we've gone ahead and escalated your request to our Developers. Exactly when or if it's developed depends on their workload, how viable it is, and how many other users also request it. If there are any updates, we’ll circle back to this thread and let you know. 

    Let us know if you need any other help.

Your Answer