PSD in upload?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Dale
Forum Contributor
Posts: 466
Joined: Fri Jun 21, 2002 5:57 pm
Location: Atherstone, Warks

PSD in upload?

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
Dale
Forum Contributor
Posts: 466
Joined: Fri Jun 21, 2002 5:57 pm
Location: Atherstone, Warks

Post 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 :)
Post Reply