From 12283423bdfeb378d2f4b3c88d86b959f26b9d7c Mon Sep 17 00:00:00 2001 From: DailyDreaming Date: Tue, 4 Feb 2020 15:19:42 -0800 Subject: [PATCH] Switch presigned urls to take from main bucket. --- dss/api/bundles/__init__.py | 2 +- dss/api/files.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dss/api/bundles/__init__.py b/dss/api/bundles/__init__.py index 441757af..b5bd44c1 100644 --- a/dss/api/bundles/__init__.py +++ b/dss/api/bundles/__init__.py @@ -109,7 +109,7 @@ def get( elif presignedurls: handle = Config.get_blobstore_handle(_replica) file_version['url'] = handle.generate_presigned_GET_url( - _replica.checkout_bucket, + _replica.bucket, "{}/{}".format( get_dst_bundle_prefix(uuid, bundle_metadata[BundleMetadata.VERSION]), _file[BundleFileMetadata.NAME], diff --git a/dss/api/files.py b/dss/api/files.py index 9ad12ad4..d60d6366 100644 --- a/dss/api/files.py +++ b/dss/api/files.py @@ -105,12 +105,12 @@ def get_helper(uuid: str, replica: Replica, version: str = None, token: str = No if content_disposition: # can tell a browser to treat the response link as a download rather than open a new tab response = redirect(handle.generate_presigned_GET_url( - replica.checkout_bucket, + replica.bucket, get_dst_key(blob_path), response_content_disposition=content_disposition)) else: response = redirect(handle.generate_presigned_GET_url( - replica.checkout_bucket, + replica.bucket, get_dst_key(blob_path))) else: with tracing.Subsegment('make_retry'):