django-storages with Amazon S3 - prevent overwriting
amazon-s3, django, file-upload, python
Solution
If you are using the s3boto backend not the old s3 backend in django-storages then you can change this using the `AWS_S3_FILE_OVERWRITE` setting: https://bitbucket.org/david/django-storages/src/83fa2f0ba20c/storages/backends/s3boto.py#cl-43
Problem
I noticed that django-storages (or perhaps it's Django's storage API itself) overwrites files with the same name. This is a problem for me as my site allows user uploads, so I need to ensure that files are never overwritten. Ideally I'd like to be able to pass a file name to the storage backend from the view level, but I'm struggling to find an elegant way to do this. I'd be equally happy if there's a switch somewhere where I can just do something like `overwrite=False` and have the backend come up with its own alternative name.