mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-21 09:58:26 +00:00
Add new a tool ds.sh
A commandline script to upload given files to docspell. The URLs can be configured using a configuration file.
This commit is contained in:
@ -97,7 +97,7 @@ info() {
|
||||
|
||||
upload() {
|
||||
tf=$($MKTEMP_CMD) rc=0
|
||||
$CURL_CMD -s -o "$tf" -w "%{http_code}" -XPOST -F file=@"$1" "$2" | (2>&1 1>/dev/null grep 200)
|
||||
$CURL_CMD -# -o "$tf" --stderr "$tf" -w "%{http_code}" -XPOST -F file=@"$1" "$2" | (2>&1 1>/dev/null grep 200)
|
||||
rc=$(expr $rc + $?)
|
||||
cat $tf | (2>&1 1>/dev/null grep '{"success":true')
|
||||
rc=$(expr $rc + $?)
|
||||
|
Reference in New Issue
Block a user