Hello Experts
I have requirement where I am uploading scanned Documents into the application. However for security concerns, I have limit the allowed MIME types of the files.
for determining the MIME type of file, I am using following code:
mimeType = fileResource.getResourceType().getHtmlMime();
I am working on NW 7.4. However I have noticed that with this code, it returns the MIME type based on file extension only. Due to this, one can change the file extension of the file and bypass the security check.
Can you suggest any better way of determining the MIME type.
Regards,
Deepak