aboutsummaryrefslogtreecommitdiff
path: root/static/fuss-upload
blob: 6d23b25fa002f955a936540f5f35e41656106392 (plain)
1
2
3
4
5
6
7
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