Re: how to determine the actual file format of an image file?
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 44561
interpreted = N
texte = on 10/30/02 11:22 AM, dale's stuff at stuff@colony.net so noted...> does anyone know how to determine the actual file format of an image file> that has been uploaded?> > I do not wish to rely just on the file extension as supplied by the user.I ignore the extension and look at the MIME type as supplied by the browserduring the processing of the upload.[text]ca_fileType=[middle startafter=Content-Type: ][name][/middle][/text][if ([ca_fileType]^/gif)][then][text]ca_fileExt=gif[/text][/then][else][if ([ca_fileType]^/jpeg)][then][text]ca_fileExt=jpeg[/text][/then][else][if ([ca_fileType]^/msword)][then][text]ca_fileExt=doc[/text][/then][else][if ([ca_fileType]^/plain)|([ca_fileType]^/x-usenet-faq)][then][text]ca_fileExt=txt[/text][/then][else][if ([ca_fileType]^/rtf)|([ca_fileType]^/x-rtf)|([ca_fileType]^/richtext)][then][text]ca_fileExt=rtf[/text][/then][else][if ([ca_fileType]^/mspowerpoint)|([ca_fileType]^/powerpoint)|([ca_fileType]^/vnd.ms-powerpoint)|([ca_fileType]^/x-mspowerpoint)][then][text]ca_fileExt=ppt[/text][/then][else][if ([ca_fileType]^/pdf)][then][text]ca_fileExt=pdf[/text][/then][else][if ([ca_fileType]^/x-compressed)|([ca_fileType]^/x-zip-compressed)|([ca_fileType]^/zip)|([ca_fileType]^/x-zip)][then][text]ca_fileExt=zip[/text][/then][else][if ([ca_fileType]^/x-sit)|([ca_fileType]^/x-stuffit)][then][text]ca_fileExt=sit[/text][/then][else][text multi=T]ca_linkedError=T&ca_localErr=T&ca_linkedError.[ca_linkedNum]=Linkedfile is not a supported type[/text][/else][/if][/else][/if][/else][/if][/else][/if][/else][/if][/else][/if][/else][/if][/else][/if][/else][/if]Rob MarquardtDesigner/Resident WireheadToast Design800 Washington Avenue NorthMinneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.com-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
on 10/30/02 11:22 AM, dale's stuff at stuff@colony.net so noted...> does anyone know how to determine the actual file format of an image file> that has been uploaded?> > I do not wish to rely just on the file extension as supplied by the user.I ignore the extension and look at the MIME type as supplied by the browserduring the processing of the upload.[text]ca_fileType=[middle startafter=Content-Type: ][name][/middle][/text][if ([ca_fileType]^/gif)][then][text]ca_fileExt=gif[/text][/then][else][if ([ca_fileType]^/jpeg)][then][text]ca_fileExt=jpeg[/text][/then][else][if ([ca_fileType]^/msword)][then][text]ca_fileExt=doc[/text][/then][else][if ([ca_fileType]^/plain)|([ca_fileType]^/x-usenet-faq)][then][text]ca_fileExt=txt[/text][/then][else][if ([ca_fileType]^/rtf)|([ca_fileType]^/x-rtf)|([ca_fileType]^/richtext)][then][text]ca_fileExt=rtf[/text][/then][else][if ([ca_fileType]^/mspowerpoint)|([ca_fileType]^/powerpoint)|([ca_fileType]^/vnd.ms-powerpoint)|([ca_fileType]^/x-mspowerpoint)][then][text]ca_fileExt=ppt[/text][/then][else][if ([ca_fileType]^/pdf)][then][text]ca_fileExt=pdf[/text][/then][else][if ([ca_fileType]^/x-compressed)|([ca_fileType]^/x-zip-compressed)|([ca_fileType]^/zip)|([ca_fileType]^/x-zip)][then][text]ca_fileExt=zip[/text][/then][else][if ([ca_fileType]^/x-sit)|([ca_fileType]^/x-stuffit)][then][text]ca_fileExt=sit[/text][/then][else][text multi=T]ca_linkedError=T&ca_localErr=T&ca_linkedError.[ca_linkedNum]=Linkedfile is not a supported type[/text][/else][/if][/else][/if][/else][/if][/else][/if][/else][/if][/else][/if][/else][/if][/else][/if][/else][/if]Rob MarquardtDesigner/Resident WireheadToast Design800 Washington Avenue NorthMinneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.com-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Rob Marquardt
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
exact word search (1998)
Ranking search results (2002)
[WebDNA] Database Not Found (2012)
no template caching (1997)
quantity minimum problem (1997)
unusual search problem (1998)
formatting a number (1999)
[newcart] (1998)
Parameter Passing (2000)
Signal Raised error (1997)
Webcatalog and CyberSTUD (1998)
FYI: virus alert (1996)
Math with Time (1997)
Error: this shopping cart has already been submittedm (2004)
Opinion: [input] should be called [output] ... (1997)
price formula (1999)
[include ...] behavior (1997)
Re:need help please (1997)
Random question (1998)
Erotic Sites (1997)