shareable upload tokens
This commit is contained in:
@@ -298,11 +298,26 @@ function t16-download-password() {
|
||||
-H "Password: wrongpassword" \
|
||||
"$FLASK_PUBLIC_URL"/d/"$token_name" > downloaded
|
||||
file downloaded
|
||||
}
|
||||
|
||||
|
||||
|
||||
function t17-new-upload_token() {
|
||||
token=$( curl -fL -w "\n" \
|
||||
-H "Secret: $FLASK_ACCESS_TOKEN" \
|
||||
-H "Expiry-days: 1" \
|
||||
"$FLASK_PUBLIC_URL"/new_token )
|
||||
echo $token
|
||||
cat "$IMAGE" | \
|
||||
curl -fL -w "\n" -F file="@-" -X POST \
|
||||
-H "Name: $IMAGE" \
|
||||
-H "Token: $token" \
|
||||
"$FLASK_PUBLIC_URL"/upload
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
_getlist() {
|
||||
declare -F | awk '{ print $3 }' | grep -v ^_
|
||||
echo exit
|
||||
|
||||
Reference in New Issue
Block a user