easier for upload

This commit is contained in:
q
2025-04-07 18:49:28 +03:00
parent 7fcf30a68a
commit a2f0ee1a81

View File

@@ -155,6 +155,7 @@ _upload_token() {
-H "Secret: $MFL_TOKEN" \ -H "Secret: $MFL_TOKEN" \
"$MFL_ROOTURL"/new_token ) "$MFL_ROOTURL"/new_token )
cat <<EOF cat <<EOF
# With password:
curl -fL -g --upload-file "file_to_upload.ext" \\ curl -fL -g --upload-file "file_to_upload.ext" \\
-H "Name: name_to_store_as.ext" \\ -H "Name: name_to_store_as.ext" \\
-H "Max-Downloads: 10" \\ -H "Max-Downloads: 10" \\
@@ -163,11 +164,8 @@ curl -fL -g --upload-file "file_to_upload.ext" \\
-H "Password: lock_with_password" \\ -H "Password: lock_with_password" \\
"$MFL_ROOTURL"/upload "$MFL_ROOTURL"/upload
curl -fL -g --upload-file "file_to_upload.ext" \\ # Simplified:
-H "Name: name_to_store_as.ext" \\ FN=file_to_upload.ext; curl -fL -g --upload-file "$FN" -H "Name: $( basename "$FN" )" -H "Token: $token" "$MFL_ROOTURL"/upload
-H "Token: $token" \\
"$MFL_ROOTURL"/upload
EOF EOF
} }