Fix MediaRootS3BotoStorage: do not override existing files (#1367)

* Fix MediaRootS3BotoStorage: do not override existing files

see https://github.com/jschneier/django-storages/issues/50

* Update "other contributors"

* alphabetical order
This commit is contained in:
Pierre Chiquet 2017-12-13 14:06:48 +01:00 committed by Shupeyko Nikita
parent 0d1ced03ec
commit d2dd265a99
2 changed files with 2 additions and 1 deletions

View File

@ -127,6 +127,7 @@ Listed in alphabetical order.
Pablo `@oubiga`_
Parbhat Puri `@parbhat`_
Peter Bittner `@bittner`_
Pierre Chiquet `@pchiquet`_
Raphael Pierzina `@hackebrot`_
Raony Guimarães Corrêa `@raonyguimaraes`_
Reggie Riser `@reggieriser`_

View File

@ -120,7 +120,7 @@ DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
# See:http://stackoverflow.com/questions/10390244/
from storages.backends.s3boto3 import S3Boto3Storage
StaticRootS3BotoStorage = lambda: S3Boto3Storage(location='static') # noqa
MediaRootS3BotoStorage = lambda: S3Boto3Storage(location='media') # noqa
MediaRootS3BotoStorage = lambda: S3Boto3Storage(location='media', file_overwrite=False) # noqa
DEFAULT_FILE_STORAGE = 'config.settings.production.MediaRootS3BotoStorage'
MEDIA_URL = 'https://s3.amazonaws.com/%s/media/' % AWS_STORAGE_BUCKET_NAME