mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
tusd: Use GCS upload backend when the endpoint matches.
This works around tus/tusd#322, which in turn is caused by aws/aws-sdk-go-v2#1816. This requires separate authentication via service account key. Fixes: #34186.
This commit is contained in:
committed by
Tim Abbott
parent
cf51013bb7
commit
e1aa8b1cb0
@@ -63,6 +63,12 @@ class Command(BaseCommand):
|
||||
if settings.LOCAL_UPLOADS_DIR is not None:
|
||||
assert settings.LOCAL_FILES_DIR is not None
|
||||
tusd_args.append(f"-upload-dir={settings.LOCAL_FILES_DIR}")
|
||||
elif settings.S3_ENDPOINT_URL in (
|
||||
"https://storage.googleapis.com",
|
||||
"https://storage.googleapis.com/",
|
||||
):
|
||||
tusd_args.append(f"-gcs-bucket={settings.S3_AUTH_UPLOADS_BUCKET}")
|
||||
env_vars["GCS_SERVICE_ACCOUNT_FILE"] = "/etc/zulip/gcp_key.json"
|
||||
else:
|
||||
tusd_args.append(f"-s3-bucket={settings.S3_AUTH_UPLOADS_BUCKET}")
|
||||
if settings.S3_ENDPOINT_URL is not None:
|
||||
|
||||
Reference in New Issue
Block a user