Skip to content

Instantly share code, notes, and snippets.

@danielbraun
Last active August 29, 2015 14:10
Show Gist options
  • Save danielbraun/07604e7bd6f1650aa2e7 to your computer and use it in GitHub Desktop.
Save danielbraun/07604e7bd6f1650aa2e7 to your computer and use it in GitHub Desktop.
django-storages + Amazon S3

For those of you trying to integrate django-storages with Amazon S3, don't select Frankfurt as the bucket region. Use the default region (US standard or something). You'll get into weird HTTP 400 errors otherwise.

Also, make sure that DEFAULT_FILE_STORAGE is 'storages.backends.s3boto.S3BotoStorage' The other engine mentioned, 'storages.backends.s3.S3Storage', is broken.

In addition, add AWS_QUERYSTRING_AUTH = False to your settings. Otherwise, django-storages breaks browser caching by default. SO Answer: http://stackoverflow.com/questions/15668443/django-storage-with-s3-boto-break-browser-cache/15710661#15710661

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment