I want to use Backblaze to serve media files only in Django. I have used django-storages
for that purpose, and as per it’s documentation it support Backblaze.
I used the below configuration in settings.py -
INSTALLED_APPS = [
............
'storages',
'boto',
]
STORAGES = {
"default": {
"BACKEND": "storages.backends.s3boto3.S3Boto3Storage",
},
"staticfiles": {
"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",
},
}
AWS_ACCESS_KEY_ID = "<my_backblaze_application_keyID>"
AWS_SECRET_ACCESS_KEY = "<my_backblaze_applicationKey>"
AWS_STORAGE_BUCKET_NAME = "<my_public_bucket_name>"
AWS_S3_REGION_NAME = "<region_set_by_backblaze>"
AWS_S3_ENDPOINT = f"s3.{AWS_S3_REGION_NAME}.backblazeb2.com"
AWS_S3_ENDPOINT_URL = f"https://{AWS_S3_ENDPOINT}"
AWS_S3_CUSTOM_DOMAIN = f'{AWS_STORAGE_BUCKET_NAME}.{AWS_S3_ENDPOINT}'
MEDIA_URL = '/media/'
But the files are not uploading in the Backblaze. How to implement that properly?