How to make UploadCare accept text only

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

and this page on validation: