1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues

Issues

Issue #9726 resolved

Adding duplicate files on Downloads tab causes 500 Server Error and file to be unavailable (BB-10838)

Adam Brengesjö
created an issue

Steps to reproduce

  1. Navigate to the downloads tab on your repository
  2. Upload a file, for example Foo.txt
  3. Upload the file again

Expected result

  • 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)

Actual result

  • 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).

Comments (10)

  1. Yaroslav Stavnichiy

    Voting for this issue.

    Uploading with same name worked well until May 2014. Broke sometime between 2014-05-19 and 2014-05-26. Now duplicate entries appear.

    Generally I do not want to delete previous download entries before uploading file with same name. I frequently update same file (upload new packaged distro after every commit/push) and I'd like download stats to accumulate, not reset every time.

    Previous behavior (before May 2014) was perfect. Please restore it.

  2. Jordan Cristiano

    Voting for this. Having the old behavior, but a more explicit indication of it would be a sane solution. This could be in the form of an "Edit" button available for each download, allowing you to upload a new version of the file without breaking links/clearing download counts.

  3. Log in to comment