this thread might help: https://community.uploadcare.com/t/how-to-limit-the-filetypes
and this page on validation: