aboutsummaryrefslogtreecommitdiff
path: root/static/fuss-upload
diff options
context:
space:
mode:
Diffstat (limited to 'static/fuss-upload')
-rwxr-xr-xstatic/fuss-upload8
1 files changed, 8 insertions, 0 deletions
diff --git a/static/fuss-upload b/static/fuss-upload
new file mode 100755
index 0000000..6d23b25
--- /dev/null
+++ b/static/fuss-upload
@@ -0,0 +1,8 @@
+#!/bin/sh
+# File: fuss-upload.sh
+# Goal: wrap around curl to include the timestamp header to fuss
+test -z "${INFILE}" && INFILE="${1}"
+test -z "${FUSS_URL}" && FUSS_URL="${2}"
+test ! -r "${INFILE}" && { echo "Cannot read file ${INFILE}. Aborted." 1>&2 ; exit 1; }
+lastModified="$( stat -c "%Y" "${INFILE}" )"
+curl -v --header "lastModified: ${lastModified}" -F "file=@${INFILE}" "${FUSS_URL}"
bgstack15