Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am trying to create an upload area (frontend) for word press users on a site. I've got a lot of types opened up through some function calls, but unable to correctly get PSD support. I'm seeing a lot of different types, and to my knowledge have tried all. I'm not sure if my hosting environment makes any difference. Am on Hostgator VPS.

Anyone successfully gotten WP to upload PSDs?

share|improve this question
    
My hosting MIME type area lists it as 'image/vnd.adobe.photoshop' ... skipping it for now. Hopefully people who make PSDs are smart enough to zip them... –  GhostToast Mar 19 '12 at 20:30

1 Answer 1

up vote 4 down vote accepted

This is what I use to allow PSD upload:

add_filter('upload_mimes', 'custom_upload_mimes');

function custom_upload_mimes ( $existing_mimes = array() ) {
    $existing_mimes['psd'] = 'image/vnd.adobe.photoshop';
    return $existing_mimes;
}
share|improve this answer
    
I already have this exact code actually. Not sure why it's not working. I still get this message Sorry, this file type is not permitted for security reasons when trying to upload through WP media uploader. –  GhostToast Mar 20 '12 at 14:05
    
Update. Something must have been wrong. I know I had it character for character, but must have had some invalid white-space somewhere or something... I ended up copying your line (just the $existing_mimes['psd'].... part) and it worked perfectly - finally! Been beating my head against the desk on this one. Thanks for making me try again. –  GhostToast Mar 20 '12 at 14:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.