tusd/examples/hooks/pre-get

7 lines
145 B
Plaintext
Raw Normal View History

2021-05-27 07:57:32 +00:00
#!/bin/sh
filename=$(cat /dev/stdin | jq .MetaData.filename)
if [[ $filename != "public" ]; then
echo "Error: access unauthorized"
exit 1
fi