WordPress will only lets you upload images (png, gif, jpg, pdf, etc). It does not allow to upload extra file type. Here in this article we given perfect solutions for adding extra file types. Some plugins and code for upload extra file type.
There are some nice wordpress plugin which will help you to add extra file types for upload.
AP Extended MIME Types
The Ardent Pixels’ Extended MIME Types plugin was created specifically for WPMS in mind. You can now allow all or only select blogs to upload a WIDE range of file types.
Upload File Type Settings Plugin
By default, WordPress only allows a very limited set of file types to be uploaded. This set is defined by a so called “white list”. What’s not on the white list can’t be uploaded.
This plugin allows you to extend this white list through a settings page.
Additionally it comes with a wide range of file types that are enabled automatically, like audio files (ac3, mp4, …) and video files (avi, mkv, …).
PJW Mime Config
This plugin allows you to configure extra mime-types for support by the inline-uploader.
A new options page is added as Options … Mime-types which allows you to add/delete the extra mime-types.
By default the following extra mime-types are registered: audio/ac3, audio/MPA and video/x-flv.
Code Sample
If you want to manually add file types for your wordpress site than you can use following code.
For uploading photoshop (psd file) through wordpress dashboard.
function my_myme_types($mime_types){ $mime_types['svg'] = 'image/svg+xml'; //Adding svg extension $mime_types['psd'] = 'image/vnd.adobe.photoshop'; //Adding photoshop files return $mime_types; } add_filter('upload_mimes', 'my_myme_types', 1, 1);
Using above code you can add psd and svg file type for uploading.