@@ -155,7 +155,7 @@ def upload_blob_s3(
155
155
in the backend.
156
156
"""
157
157
params = {"storageInterface" : "s3" , "objectName" : object_name }
158
- presigned_json = self .get_request (endpoint , params = params )
158
+ presigned_json = self .get_request (f" { endpoint } /presigned-url" , params = params )
159
159
with open (file_path , "rb" ) as f :
160
160
with tqdm (
161
161
total = os .stat (file_path ).st_size ,
@@ -181,7 +181,7 @@ def upload_blob_gcs(
181
181
in the backend.
182
182
"""
183
183
params = {"storageInterface" : "gcs" , "objectName" : object_name }
184
- presigned_json = self .get_request (endpoint , params = params )
184
+ presigned_json = self .get_request (f" { endpoint } /presigned-url" , params = params )
185
185
with open (file_path , "rb" ) as f :
186
186
with tqdm (
187
187
total = os .stat (file_path ).st_size ,
@@ -208,7 +208,7 @@ def upload_blob_azure(
208
208
in the backend.
209
209
"""
210
210
params = {"storageInterface" : "azure" , "objectName" : object_name }
211
- presigned_json = self .get_request (endpoint , params = params )
211
+ presigned_json = self .get_request (f" { endpoint } /presigned-url" , params = params )
212
212
with open (file_path , "rb" ) as f :
213
213
with tqdm (
214
214
total = os .stat (file_path ).st_size ,
@@ -239,7 +239,7 @@ def transfer_blob(self, endpoint: str, file_path: str, object_name: str, body=No
239
239
blob_path = f"{ UNBOX_STORAGE_PATH } /{ endpoint } /{ id } "
240
240
try :
241
241
os .makedirs (blob_path , exist_ok = True )
242
- except OSError as _ :
242
+ except OSError :
243
243
raise UnboxException (f"Directory { blob_path } cannot be created" )
244
244
shutil .copyfile (file_path , f"{ blob_path } /{ object_name } " )
245
245
body ["storageUri" ] = f"local://{ blob_path } "
0 commit comments