feat: upload to dl.mcaptcha.org
This commit is contained in:
parent
6a41f7fa0b
commit
b4106f0718
1 changed files with 22 additions and 0 deletions
22
upload.sh
Executable file
22
upload.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -xEeuo pipefail
|
||||
readonly UPLOAD_DIR="cli/master"
|
||||
readonly DUMBSERVE_HOST="https://$DUMBSERVE_USERNAME:$DUMBSERVE_PASSWORD@dl.mcaptcha.org"
|
||||
|
||||
|
||||
curl --location --request DELETE "$DUMBSERVE_HOST/api/v1/files/delete" \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw "{
|
||||
\"path\": \"$UPLOAD_DIR\"
|
||||
}"
|
||||
|
||||
|
||||
pushd dist/
|
||||
for file in *
|
||||
do
|
||||
curl -v \
|
||||
-F upload=@$file \
|
||||
"$DUMBSERVE_HOST/api/v1/files/upload?path=$UPLOAD_DIR"
|
||||
done
|
||||
popd
|
Loading…
Reference in a new issue