I am using the following Regex:
([^\s]+(\.(?i)(pdf|ds2))$)
I only want to allow any file with the .PDF or .DS2 extensons – but the file uploader is letting any file extension through to be uploaded.
Which works in online regex tester: https://regex101.com/
Any Ideas ?
The AllowedFileTypes property is not a regex, it’s a weird IANA Media Types specifications and not all browsers use it correctly.
It’s not a Wisej thing. Uploading of files is entirely in the hands of the browser.
See also:
https://docs.wisej.com/api/wisej.web/content/upload#allowedfiletypes
https://www.w3schools.com/tags/att_input_accept.asp
Please login first to submit.