Page 1 of 1

PSD in upload?

Posted: Mon Mar 07, 2005 7:20 pm
by Dale
Im using an upload form and i wanted to know is there a file type thingy for a PSD file?

eg; GIF files have this:

Code: Select all

'image/gif'
And PNG files have this:

Code: Select all

'image/x png'
And JPEG/JPG files have this:

Code: Select all

image/jpeg
Is there one for a PSD?

Posted: Mon Mar 07, 2005 7:25 pm
by feyd
do not rely on the "type" information being correct in the upload.

Photoshop files do not have a specific mime type. In order to fully determine if a file is a photoshop file, you must read the binary data.

Posted: Mon Mar 07, 2005 7:30 pm
by Dale
The great and powerful feyd... do you ever sleep? :p

I use the 'type' information as a check and use other codes with it to narrow down the checking of file types, however i just need to know if PSD had one too, seems it doesn't.

Thanks :)