Adding duplicate files on Downloads tab causes 500 Server Error and file to be unavailable (BB-10838)
Steps to reproduce
- Navigate to the downloads tab on your repository
- Upload a file, for example Foo.txt
- Upload the file again
- A single file named Foo.txt to be listed
- Calling HTTP GET .../downloads/Foo.txt will return 200 OK with the file contents (for the last file)
- Two files named Foo.txt are listed
- Calling HTTP GET .../downloads/Foo.txt results in 500 Internal Server Error
When I tried to "fix" it by deleting one of the files, I got 404 Not Found when trying to download the other file. I had to delete both files and upload one of them again in order to fix it.
If uploading a file with same name as an existing used to overwrite the existing file (so this is a regression error).