Setting the mime-type for files stored in the private directory How do I set the mime-type of files being served from the drupal private directory. I have a webm file in the private directory, and the I've added the &lt;video&gt; tag to the page using a tpl file.

I've tried adding 

AddType video/webm .webm


to .htaccess. I've also tried installing the module "File Mime" to try to set the right mime type. I've tried adding

function mymodule_file_download($uri){
    return array('Content-type: '.'video/webm');
}


to my .module file. Nothing seems to work. Any help would be appreciated.
Editing includes/files.mimetypes.inc is a core hack, which you should strive to avoid.

Instead, use hook_file_mimetype_mapping_alter():

function mymodule_file_mimetype_mapping_alter(&amp;$mapping) {
  // Add new MIME type 'video/webm'.
  $mapping['mimetypes']['webm'] = 'video/webm';
  // Add new extension '.webm' and map it to the 'video/webm' MIME type.
  $mapping['extensions']['webm'] = 'webm';
}