0

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).

2

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;
}
|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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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