-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Control over filenames #29
Comments
For the S3 storage there is an |
I recently implemented https://github.com/jedie/django-tools#overwritefilesystemstorage |
I ended up using a function for upload_to in the model definition:
Then, when defining your FileField/ImageField, specify get_file_path as the upload_to value.
source: stackoverflow: enforce unique upload file names using django |
At present, if a file already exists within the directory with the same name, the new file is renamed. Is there any way to preserve the orginal filename either by deleting the old existing file, renaming the existing file first, sending a sub directory or some other way?
Kind regards.
The text was updated successfully, but these errors were encountered: