This commit is contained in:
parent
d4e9905cef
commit
25aff1baab
6
sos/sos
6
sos/sos
@ -68,7 +68,7 @@ function upload() {
|
||||
|
||||
# upload the file
|
||||
TARGET_SERVER="https://$server"
|
||||
echo "Uploading $file to $TARGET_URL"
|
||||
echo "Uploading $file to $TARGET_SERVER"
|
||||
|
||||
DATETIME=$(datetime)
|
||||
|
||||
@ -113,14 +113,14 @@ EOF
|
||||
-F "metadata=${METADATA_JSON}" \
|
||||
-F "hash=${LOCALHASH}" \
|
||||
"$TARGET_SERVER/update" \
|
||||
|| die "Failed to upload $file to $TARGET_URL"
|
||||
|| die "Failed to upload $file to $TARGET_SERVER/update"
|
||||
else
|
||||
# UPLOAD the file + metadata
|
||||
curl -X PUT -H "Authorization: Bearer ${WRITE_TOKEN}" \
|
||||
-F "metadata=${METADATA_JSON}" \
|
||||
-F "file=@${file}" \
|
||||
"$TARGET_SERVER/upload" \
|
||||
|| die "Failed to upload $file to $TARGET_URL"
|
||||
|| die "Failed to upload $file to $TARGET_SERVER/upload"
|
||||
fi
|
||||
|
||||
echo " "
|
||||
|
Loading…
x
Reference in New Issue
Block a user