Can I restrict the files which are not pdf files while browsing a file to upload in Mendix?

0
Hi. In my project, I am merging some files which are uploaded manually by using upload functionality. When I am trying to browse the file, I have a list files (e.g., Excel, Word, Images and Text documents etc.) Can I restrict them while I am browsing the file? I need to get only PDF files. Can any one help me?  Thanks.
asked
3 answers
0

In the file uploader widget, there is an attribute called Allowed extensions where you can define what extensions can be uploaded

HTH... Dave

answered
0

The best way to solve this is create an enumeration with filetype. In a microflow check the extension (by finding the last . in the name and do a substring on the rest). When you have the extension string compare it to known filetypes like .png and .pdf etc. Set the enumeration according to what you find. Then you can use this enumeration in the document overview. Hope this helps.

Regards,

Ronald

 

answered
0

If you try to achieve something like this fiddle, than as far is i know there is no way to do that with default functionality.

The File Manager widget only validates after the user has selected a file. Instead of limiting the file a user can see as demonstrated using the fiddle above.

answered