Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9164

MIME type of File

$
0
0

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


Viewing all articles
Browse latest Browse all 9164

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>