blob: 3f0a4548ca4307f3f1b2e582be7dd2b92353b8f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/bin/bash
PREFIX=$(dirname "$0")
CLOUD_AUTH=$(<"$PREFIX/cloud-auth")
UPLOAD_PATH="https://cloud.adast.xyz/public.php/webdav/uploads"
if [ -f "$1" ]; then
FILE=$(basename "$1")
curl -T "$1" -u "$CLOUD_AUTH" "$UPLOAD_PATH/$FILE"
else
echo "error: invalid file $1"
fi
|