Suggestion - option to disallow multiple files with the same name in the same channel/folder.
For example, if I upload “file.pdf” and then upload another file named “file.pdf”, it creates both of them with the same name, which is different than what most people (I think) would expect.
My suggestion:
- Option to disallow multiple files with the same name (so default is the current behavior)
- When disallowed, on upload in the UI, it would either give error if someone tried to upload a file with a name that already exists, or ask if they want to overwrite (no doesn’t upload, yes overwrites the file) or upload and give it a name with a sequential number at the end - (1), (2), etc.
- With the API, either return error status if file already exists and/or allow an &overwrite=1 in the API call that lets me tell the API to either create the file if it doesn’t exist or overwrite it if it does
Currently with the API, on every upload, I have to List all of the files in the folder and iterate through all of them to see if the file I am uploading exists, then delete it if it does, then upload the file. This uses extra API calls against my daily limit.