Fix AWS endpoint URL

This commit is contained in:
Ramon Wenger 2019-10-23 13:59:30 +02:00
parent cb54822535
commit 40dae4f2c0
1 changed files with 2 additions and 2 deletions

View File

@ -246,11 +246,11 @@ AWS_STORAGE_BUCKET_NAME = os.environ.get('AWS_STORAGE_BUCKET_NAME')
AWS_S3_FILE_OVERWRITE = False
# use with cloudfront
# AWS_S3_CUSTOM_DOMAIN = '%s.s3.amazonaws.com' % AWS_STORAGE_BUCKET_NAME
AWS_S3_CUSTOM_DOMAIN = '%s.s3-eu-west-1.amazonaws.com' % AWS_STORAGE_BUCKET_NAME
if USE_AWS:
DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
# use with cloudfront
# MEDIA_URL = "https://%s/" % AWS_S3_CUSTOM_DOMAIN
MEDIA_URL = "https://%s/" % AWS_S3_CUSTOM_DOMAIN
else:
MEDIA_URL = '/media/'
MEDIA_ROOT = os.environ.get('DJANGO_MEDIAFILES', os.path.join(BASE_DIR, 'media'))