Skip to content

Commit

Permalink
Revert changes to indexd data blueprint
Browse files Browse the repository at this point in the history
  • Loading branch information
lbeckman314 committed Dec 15, 2023
1 parent 3839a4d commit fbcb64c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions fence/blueprints/data/indexd.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,13 +349,12 @@ def init_multipart_upload(key, expires_in=None, bucket=None):
Returns:
uploadId(str)
"""
bucket = bucket or flask.current_app.config["DATA_UPLOAD_BUCKET"]
if not bucket:
try:
bucket = flask.current_app.config["DATA_UPLOAD_BUCKET"]
except KeyError:
raise InternalError(
"fence not configured with data upload bucket; can't create signed URL"
)
raise InternalError(
"fence not configured with data upload bucket; can't create signed URL"
)

s3_url = "s3://{}/{}".format(bucket, key)
return S3IndexedFileLocation(s3_url).init_multipart_upload(expires_in)

Expand Down

0 comments on commit fbcb64c

Please sign in to comment.