From fc46f12939f0076804433ed2aafdedcaacca5f38 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Tue, 15 May 2018 19:42:03 +0100 Subject: [PATCH] AWS_S3_FILE_OVERWRITE must be False, not True --- docs/advanced_topics/deploying.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/advanced_topics/deploying.rst b/docs/advanced_topics/deploying.rst index 25fc2e147..4e144d4bb 100644 --- a/docs/advanced_topics/deploying.rst +++ b/docs/advanced_topics/deploying.rst @@ -23,7 +23,7 @@ Cloud storage Wagtail follows `Django's conventions for managing uploaded files `_, and can be configured to store uploaded images and documents on a cloud storage service such as Amazon S3; this is done through the `DEFAULT_FILE_STORAGE `_ setting in conjunction with an add-on package such as `django-storages `_. Be aware that setting up remote storage will not entirely offload file handling tasks from the application server - some Wagtail functionality requires files to be read back by the application server. In particular, documents are served through a Django view in order to enforce permission checks, and original image files need to be read back whenever a new resized rendition is created. -Note that the django-storages Amazon S3 backends (``storages.backends.s3boto.S3BotoStorage`` and ``storages.backends.s3boto3.S3Boto3Storage``) **do not correctly handle duplicate filenames** in their default configuration. When using these backends, ``AWS_S3_FILE_OVERWRITE`` must be set to ``True``. +Note that the django-storages Amazon S3 backends (``storages.backends.s3boto.S3BotoStorage`` and ``storages.backends.s3boto3.S3Boto3Storage``) **do not correctly handle duplicate filenames** in their default configuration. When using these backends, ``AWS_S3_FILE_OVERWRITE`` must be set to ``False``. If you are also serving Wagtail's static files from remote storage (using Django's `STATICFILES_STORAGE `_ setting), you'll need to ensure that it is configured to serve `CORS HTTP headers `_, as current browsers will reject remotely-hosted font files that lack a valid header. For Amazon S3, refer to the documentation `Setting Bucket and Object Access Permissions `_, or (for the ``storages.backends.s3boto.S3BotoStorage`` backend only) add the following to your Django settings: