Skip to content

Commit

Permalink
Merge branch 'RESTAPI-920-download-not-reporting-error' into 'master'
Browse files Browse the repository at this point in the history
Added -f for curl command

See merge request firecrest/firecrest!258
  • Loading branch information
Juan Pablo Dorsch committed Dec 11, 2023
2 parents 1951e11 + fc820b8 commit 009767f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/storage/s3v2OS.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def create_upload_form(self, sourcepath, containername, prefix, ttl, max_file_si
"headers": {}
}

command = f"curl --show-error -s -i -X {httpVerb} '{url}?AWSAccessKeyId={self.user}&Signature={sig}&Expires={expires}' -T {sourcepath}"
command = f"curl -f --show-error -s -i -X {httpVerb} '{url}?AWSAccessKeyId={self.user}&Signature={sig}&Expires={expires}' -T {sourcepath}"

retval["command"] = command

Expand Down
2 changes: 1 addition & 1 deletion src/storage/s3v4OS.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def create_upload_form(self, sourcepath, containername, prefix, ttl, max_file_si
"headers": {}
}

command = f"curl --show-error -s -i -X {httpVerb} {presigned_url}"
command = f"curl -f --show-error -s -i -X {httpVerb} {presigned_url}"

for k,v in retval["parameters"]["data"].items():
command += f" -F '{k}={v}'"
Expand Down
2 changes: 1 addition & 1 deletion src/storage/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ def upload_task(headers, system_name, system_addr, targetPath, sourcePath, task_

# create certificate for later download from OS to filesystem
app.logger.info(f"Creating certificate for later download")
options = f"-s -G -o '{targetPath}' -- '{download_url}'"
options = f"-f -s -G -o '{targetPath}' -- '{download_url}'"
exp_time = STORAGE_TEMPURL_EXP_TIME
certs = create_certificate(headers, system_name, system_addr, f"ID={ID} curl", options, exp_time)

Expand Down
2 changes: 1 addition & 1 deletion src/storage/swiftOS.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def create_upload_form(self,sourcepath,containername,prefix,ttl,max_file_size,in
signature = hmac.new(secret, hmac_body, sha1).hexdigest()

# added OBJECT_PREFIX as dir_[task_id] in order to become unique the upload instead of user/filename
command = f"curl --show-error -s -i {swift_url}/{swift_version}/{swift_account}/{containername}/{prefix}/" \
command = f"curl -f --show-error -s -i {swift_url}/{swift_version}/{swift_account}/{containername}/{prefix}/" \
f" -X POST " \
f"-F max_file_size={max_file_size} -F max_file_count={max_file_count} " \
f"-F expires={expires} -F signature={signature} " \
Expand Down

0 comments on commit 009767f

Please sign in to comment.