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'd like to attach files that aren't on the list of supported file types. In this case I'd like to upload files from the media manager that have the .RWP extension (which is used to package files in the Train Simulator 2012 game).

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You can hook the upload_mimes filter to accomplish this:

add_filter('upload_mimes', 'wpse_43657_upload_mimes');
function wpse_43657_upload_mimes($mime_types){
     $mime_types['rwp'] = 'application/octet-stream';
     return $mime_types;
}
share|improve this answer
    
For someone who is still learning to use Wordpress (from a administrators point of view), how would I go about implementing this? –  Ambo100 Feb 27 '12 at 14:53
1  
Just place this in your functions.php file in your theme. :) –  Brian Fegter Feb 27 '12 at 14:53

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.