Determining MIME Type of MAC upload stream file

时光总嘲笑我的痴心妄想 提交于 2019-11-29 16:59:15

Dont use File Extensions to work out MIME Types, instead use "Winista" for binary analysis, see my method here that resorts back to URLMon if winista cant work it out last answer http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/d79e76e3-b8c9-4fce-a97d-94ded18ea4dd

Say someone renames a exe with a jpg extension... you can still determine the "real" file format. It doesn't detect swf's or flv's but does pretty much every other well known format + you can get a hex editor and add more files it can detect.

Edit: Download Winista: http://www.netomatix.com/Products/DocumentManagement/MimeDetector.aspx

This question has given me a great idea, since you wish to append a File Extension that will safely work on MACs and PCs I/you could edit the mime-types.xml file to include safe file extensions that will work to open specific file types on both MAC and PCs.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!