Don't allow duplicate file names

When uploading a file, duplicate file names are currently allowed. I don’t think this is desirable as it may confuse the user later on and it can prevent reproduction of parameters (e.g. when two files have the same name but contain different data).

Hi Martijn,

Thanks for your remark. Firstly let me clear up that the app itself does not use the file name to track the actual data in that file. A unique id is used which is stored in the params, so mismatching data to filenames is not possible through the app.

Nonetheless I can understand that this may be confusing to your user in some cases. Could you give me some more information with regard to your specific use-case? Why would you want to upload files with duplicate file names? And in what circumstance would you say your user could confuse files with similar names (after all a timestamp is also available in the screenshot you attached)?

Finally what would then be your preferred solution? Would you, for instance, want the old file to be overwritten in case of uploading a file with a duplicate name? Or should the new entry receive an indication [filename_(1)] appended to its name?

Thanks in advance.

Hi Daniël,

About the mismatching: I didn’t mean a mismatch of data behind the scene (which is impossible due to the IDs as you explain), but rather a “mismatch” caused by the user selecting the incorrect file name.

Example: a user uploaded a file “main.zip” (let’s call it zip A) for a calculation. Some days later a different user uploads another file “main.zip” (zip B), perhaps because the files inside the .zip are updated. The same file name is used because it’s the same type of data used for the same purpose as the first zip. Ideally one would add a timestamp in the file name itself before uploading, but a user could forget this or because he/she doesn’t know this file is already uploaded by someone else. Now, if the user wants to reproduce the calculation using the old zip (zip A) for whatever reason, it’s possible that the wrong zip (zip B) is selected.

Regarding a solution, in my opinion:

  • Overwriting the existing file by default increases the chances of overwriting by mistake; the user should at least be warned before this action is executed.
  • Appending an indication to the file name would is a good option, but may be confusing once you have multiple files with the same name if you do this automatically (e.g. filename_(1), filename_(2), filename_(3) etc.).

My suggested solution would be to show a pop-up/error warning saying the file that the user tries to upload already exists within the project, after which the user either can edit the name within the upload screen of the app or that the upload is denied after which the user first must edit the file name locally before uploading it again.

Thanks so much for the extensive answer. This allows us to quickly get an idea of what a possible feature should look like an why it is relevant.
I will open an issue in our internal tracker and add your use-case as well as your proposed solution. We will inform you further on this issue here in the topic if/when it is picked up.

Thanks again for the contribution!

1 Like