Photoshop MIME type not working???
Posted: Tue Jun 05, 2007 8:06 am
Hey guys... I have a contact form that allows users to upload files to me, and of those allowed file types, I want them to be able to send me .psd (photoshop) files. I have scoured the internet finding every possible mime-type for photoshop files, however, it is still not allowing upload of .psd files. (everything else works perfectly).
Below is a piece of my offending code:
Thanks for any help.
Below is a piece of my offending code:
Code: Select all
$allowed = array ('image/gif', 'image/jpeg', 'image/jpg', 'image/png', 'image/pjpeg', 'text/plain', 'application/postscript', 'image/bmp', 'image/x-windows-bmp', 'application/msword', 'application/pdf', 'image/tiff', 'application/excel', 'application/x-excel', 'application/x-msexcel', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip', 'video/quicktime', 'video/x-ms-wmv', 'image/x-photoshop', 'text/rtf', 'image/photoshop', 'image/x-photoshop', 'image/psd', 'application/photoshop', 'application/psd', 'zz-application/zz-winassoc-psd');
if (!in_array($_FILES[$filename]['type'], $allowed))
{
$upload_valid = FALSE;
$errors[] = 'This file type is not allowed for upload through this form.';
unlink ($_FILES[$filename]['tmp_name']);
}