Goes without saying, really. We don't want to be blindly uploading a massive .tar.gz (for example) and disguising it as a png when it's clearly not.
At least until the main pipeline's been rewritten for better error handling, it'd be best to add the check within parse_opts(). We can use file --mime-type <FILEPATH> to check. Add the -b flag and it'll suppress the filename too, which we don't particularly need.
Goes without saying, really. We don't want to be blindly uploading a massive
.tar.gz
(for example) and disguising it as apng
when it's clearly not.At least until the main pipeline's been rewritten for better error handling, it'd be best to add the check within
parse_opts()
. We can usefile --mime-type <FILEPATH>
to check. Add the-b
flag and it'll suppress the filename too, which we don't particularly need.