Skip to content

Instantly share code, notes, and snippets.

@reidjs
Last active July 26, 2025 05:39
Show Gist options
  • Save reidjs/87b2b458be603175516681d5560b6ea5 to your computer and use it in GitHub Desktop.
Save reidjs/87b2b458be603175516681d5560b6ea5 to your computer and use it in GitHub Desktop.
django fix - updating default file storage
❌ The old way was by setting a string eg # DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
✅ The correct way is to set STORAGES in settings.py to boto storage
STORAGES = {
"default": {
"BACKEND": "storages.backends.s3boto3.S3Boto3Storage",
},
"staticfiles": {
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage",
},
}
https://docs.djangoproject.com/en/5.1/ref/settings/#std-setting-STORAGES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment