Skip to content

Commit

Permalink
s3 url update
Browse files Browse the repository at this point in the history
  • Loading branch information
Hk669 committed Jun 20, 2024
1 parent 2092c35 commit 65ea3c4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Binary file modified core/__pycache__/settings.cpython-39.pyc
Binary file not shown.
Binary file modified core/__pycache__/urls.cpython-39.pyc
Binary file not shown.
12 changes: 9 additions & 3 deletions core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,19 @@
AWS_STORAGE_BUCKET_NAME = os.environ.get('AWS_STORAGE_BUCKET_NAME')
AWS_S3_REGION_NAME = 'us-east-1'
AWS_S3_CUSTOM_DOMAIN = f'{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com'
AWS_S3_SIGNATURE_VERSION = 's3v4'
AWS_S3_FILE_OVERWRITE = False
AWS_DEFAULT_ACL = None # Recommended to prevent setting public ACL by default
AWS_S3_OBJECT_PARAMETERS = {
'CacheControl': 'max-age=86400', # Set cache control headers
}

# For serving static files directly from S3
AWS_S3_USE_SSL = True
AWS_S3_VERIFY = True
AWS_S3_URL = "https://assets.hacksarena.s3.amazonaws.com/"
AWS_S3_URL = "https://assests.hacksarena.s3.amazonaws.com/"

STATIC_URL = f"{AWS_S3_URL}static/"
MEDIA_URL = f"{AWS_S3_URL}media/"
STATIC_URL = "https://assests.hacksarena.s3.amazonaws.com/static/"
MEDIA_URL = "https://assests.hacksarena.s3.amazonaws.com/media/"
STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'

0 comments on commit 65ea3c4

Please sign in to comment.