Skip to content

Commit

Permalink
Support non aws s3 for multipart
Browse files Browse the repository at this point in the history
  • Loading branch information
BinamB committed Sep 5, 2023
1 parent 3c8788d commit 3a46245
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fence/blueprints/data/multipart_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@ def generate_presigned_url_for_uploading_part(
presigned_url(str)
"""

url = "https://{}.s3.amazonaws.com/{}".format(bucket, key)
if bucket.get("endpoint_url"):
url = bucket["endpoint_url"].strip("/") + "/{}/{}".format(
bucket, key.strip("/")
)
else:
url = "https://{}.s3.amazonaws.com/{}".format(bucket, key)
additional_signed_qs = {"partNumber": str(partNumber), "uploadId": uploadId}

try:
Expand Down

0 comments on commit 3a46245

Please sign in to comment.