You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using django-storages it seems MEDIA_URL does not take effect, I believe it can be removed from the if statement.
I also noticed that we are setting a custom domain but that is not used anywhere, it seems custom domain is only useful when using a CDN like cloudfront AWS_S3_CUSTOM_DOMAIN this variable will only take effect if we remove custom_domain in storages.py HOWEVER this would disable the auth query string by default (unless the Cloudfront variables are added).
It seems like there is another variable that could be set for custom domains
AWS_S3_ENDPOINT_URL
this can be useful when your bucket is not in the default us regions
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When using django-storages it seems MEDIA_URL does not take effect, I believe it can be removed from the if statement.
I also noticed that we are setting a custom domain but that is not used anywhere, it seems custom domain is only useful when using a CDN like cloudfront AWS_S3_CUSTOM_DOMAIN this variable will only take effect if we remove custom_domain in storages.py HOWEVER this would disable the auth query string by default (unless the Cloudfront variables are added).
It seems like there is another variable that could be set for custom domains
AWS_S3_ENDPOINT_URL
this can be useful when your bucket is not in the default us regions
AWS_S3_REGION_NAME = config("AWS_S3_REGION_NAME")
AWS_S3_ENDPOINT_URL = f"https://s3/.{AWS_S3_REGION_NAME}.amazonaws.com"
I am not sure what determines the region in when not specifically calling it out.
I propose we change the configs to look like this:
Beta Was this translation helpful? Give feedback.
All reactions