tusd/examples/hooks/pre-get

7 lines
145 B
Bash

#!/bin/sh
filename=$(cat /dev/stdin | jq .MetaData.filename)
if [[ $filename != "public" ]; then
echo "Error: access unauthorized"
exit 1
fi