> -----Original Message-----
> From: Martyn Bowis [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, October 24, 2006 10:21 PM
> To: CF-Talk
> Subject: RE: Mime Type for File Upload
> 
> PS: I found the following link on Google that may help with 
> evaluating the
> mime type:
> 
> http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:48395
> 
> where filepath is the full physical path to a file you wish 
> to determine 
> the mimetype of...
> 
> #getPageContext().getServletContext().getMimeType(filePath)#

This only gets the mime type based on the file extension.  If you rename an
..exe to .jpg or .pdf, the mime type for those files will be returned.  As
far as I know, you need to use a third-party library that actually checks
the headers and/or streams, such as MimeResolver or JMimeMagic.

Andy



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257955
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to