Last active
July 26, 2025 05:39
-
-
Save reidjs/87b2b458be603175516681d5560b6ea5 to your computer and use it in GitHub Desktop.
django fix - updating default file storage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ❌ 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