Skip to content

Commit

Permalink
bug-1827506: Add setting to configure the S3 region in AWS.
Browse files Browse the repository at this point in the history
  • Loading branch information
smarnach committed Jul 29, 2024
1 parent b08c54c commit 19466b0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tecken/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,12 +635,21 @@ def filter(self, record):
"UPLOAD_S3_BUCKET",
doc="The S3 bucket name for uploads and downloads.",
)
UPLOAD_S3_REGION = (
_config(
"UPLOAD_S3_REGION",
raise_error=False,
doc="The region of the S3 download bucket.",
)
or None
)
UPLOAD_BACKEND = {
"class": "tecken.ext.s3.storage.S3Storage",
"options": {
"bucket": UPLOAD_S3_BUCKET,
"prefix": "v1",
"try_symbols": False,
"region": UPLOAD_S3_REGION,
},
}
TRY_UPLOAD_BACKEND = {
Expand All @@ -649,6 +658,7 @@ def filter(self, record):
"bucket": UPLOAD_S3_BUCKET,
"prefix": "try/v1",
"try_symbols": True,
"region": UPLOAD_S3_REGION,
},
}
DOWNLOAD_BACKENDS = []
Expand Down

0 comments on commit 19466b0

Please sign in to comment.