adding mime types
-
I am trying to build a plugin that generates a file for download per post. Right now I can generate the file and put it in the wordpress uploads directory.
when I generate a link to the files using wordpress functions I get this
https://www.sociology.org/files/1184.ris
but download doesn’t work. only this one does
https://www.sociology.org/wp-content/blogs.dir/1/files//1184.ris
I have tried adding a mime type in the plugin
function gs_add_mime_type($mimes ) { return array_merge($mimes,array ('ris' => 'text/ris')); } add_filter( 'upload_mimes', 'gs_add_mime_type' );
But that doesn’t seem to enable downloading the ris file from the directory. can anybody help? I do not want to expose anybodies download path so I need to get thsi working
- The topic ‘adding mime types’ is closed to new replies.