Hi,
We are using RadAsyncUpload and saving the ContentType property of the uploaded file.
For most uploaded files, .pdf, .docx etc. the ContentType property has been detected.
When uploading an .msg file the ContentType property is null.
Is this an known issue? Do you have any suggestions?
Thanks.
We are using RadAsyncUpload and saving the ContentType property of the uploaded file.
For most uploaded files, .pdf, .docx etc. the ContentType property has been detected.
When uploading an .msg file the ContentType property is null.
Is this an known issue? Do you have any suggestions?
Thanks.
4 Answers, 1 is accepted
0
Hello,
The reason for this behavior is because this file format is not part of the MIME type list. The file format needs to be part of that list in order the ContentType to be set properly. You can replicate same issue with the <input type="file" name="file upload">.
Regards,
Boyan Dimitrov
Telerik
The reason for this behavior is because this file format is not part of the MIME type list. The file format needs to be part of that list in order the ContentType to be set properly. You can replicate same issue with the <input type="file" name="file upload">.
Regards,
Boyan Dimitrov
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0

Michael
Top achievements
Rank 2
Iron
Iron
Iron
answered on 05 Aug 2015, 07:00 PM
This is not correct - up until very recently we were able to upload .msg files just fine so either somebody took .msg away as a valid MIME type or something changed with the RadAsyncUpload control because the MVC version of the control works just fine.
0
Hi Michael,
Please read this post:
http://www.telerik.com/forums/msg-file-contenttype-null#9iRDuIFJY0mg37UVXuuspA
Regards,
Hristo Valyavicharski
Telerik
Please read this post:
http://www.telerik.com/forums/msg-file-contenttype-null#9iRDuIFJY0mg37UVXuuspA
Regards,
Hristo Valyavicharski
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
0

Dani
Top achievements
Rank 1
answered on 23 Sep 2020, 09:04 PM
I tried different ways, not all in the code snippet:
Java 7 Files.probeContentType(path)
URLConnection mime detection from file name and content type guessing
JDK 6 JAF API javax.activation.MimetypesFileTypeMap
MimeUtil with all available subclass of MimeDetector I found
Apache Tika
Apache POI scratchpad
check it https://glensley.doodlekit.com