easier for upload
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user