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 browser during 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]^/richt ext)][then] [text]ca_fileExt=rtf[/text][/then] [else][if ([ca_fileType]^/mspowerpoint)|([ca_fileType]^/powerpoint)|([ca_file Type]^/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)|([c a_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]=Linked file 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 Marquardt Designer/Resident Wirehead Toast Design800 Washington Avenue North Minneapolis MN 55401 612.330.9863 v 612.321.9424 f www.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:

    
  1. Re: how to determine the actual file format of an image file? (Rob Marquardt 2002)
  2. Re: how to determine the actual file format of an image file?- done (dale's stuff 2002)
  3. Re: how to determine the actual file format of an image file? (dale's stuff 2002)
  4. Re: how to determine the actual file format of an image file? (Jason Tyler 2002)
  5. Re: how to determine the actual file format of an image file? (dale's stuff 2002)
  6. Re: how to determine the actual file format of an image file? (Rob Marquardt 2002)
  7. Re: how to determine the actual file format of an image file? (Glenn Busbin 2002)
  8. Re: how to determine the actual file format of an image file? (Frank Nordberg 2002)
  9. Re: how to determine the actual file format of an image file? (Brian Boegershausen 2002)
  10. Re: how to determine the actual file format of an image file? (Alain Russell 2002)
  11. Re: how to determine the actual file format of an image file? (dale's stuff 2002)
  12. Re: how to determine the actual file format of an image file? (Rob Marquardt 2002)
  13. how to determine the actual file format of an image file? (dale's stuff 2002)
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 browser during 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]^/richt ext)][then] [text]ca_fileExt=rtf[/text][/then] [else][if ([ca_fileType]^/mspowerpoint)|([ca_fileType]^/powerpoint)|([ca_file Type]^/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)|([c a_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]=Linked file 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 Marquardt Designer/Resident Wirehead Toast Design800 Washington Avenue North Minneapolis MN 55401 612.330.9863 v 612.321.9424 f www.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)