Check if uploaded file extension matches file type

0
Mendix's File manager documentation mentions this: "Security in Mendix does not include scanning files that end-users upload or download from your application for viruses and malware." Is there a way in a Microflow (other than writing my own custom java code) to make sure the file's content matches the extension? An App store module or java function or anything? I'm not neccessarily looking for any virus scanning... Just a way to make sure the file uploaded is legit. 
asked
2 answers
0

Hi Brian,

 

When reading your question, the File Dropper widget could help you out. In addition to the great UX, you will get the option to validate your files before or after the upload. This also includes filtering based on mime type.

 

If you want to restrict certain types statically, you can also set this in the Mendix File Manager widget itself (extensions).

 

Is this what you're looking for? If you want to see if, for example, a .jpeg file is really an image, I'm afraid I can't help you out.

answered
0

There is a GetFileType java action in the latest ApprontoCommon module that may help you out. It uses the Apache Tika library.

answered