Opened 17 years ago
Closed 17 years ago
#5276 closed (duplicate)
change filenames of uploaded files
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Right now when two files with identical name are uploaded, one of them will get '_' prefix.
I consider this solution quite ugly and impractical, because there are some situations when many files with same name will be uploaded. And when filename reaches critical length, problems will come up.
Consider online gallery, for example - how many users might wish to upload the picture called 'cat.jpg'?
I think the people from imageshack.us have created a good solution for that problem - hash from some value (number of files?) is added to the filename, and they get filenames like 'catfg3.jpg'
I believe that same thing should be implemented in Django.
Duplicate of #5029, and see also the wiki page CustomUploadAndFilters