Thread Starter
lohic
(@lohic)
I forgot to say that my standard images are showing correctly (jpg, gif, png).
In my template I hadded a filter
Where’s this? Your function.php?
Better to put this in the wp-content/mu-plugins/ folder
<?php
/*
Plugin Name: Sitewide Functions
Author: lohic
*/
add_filter('upload_mimes', 'add_custom_upload_mimes');
function add_custom_upload_mimes($existing_mimes){
$existing_mimes['svg'] = 'image/svg+xml'; //allow svg files
return $existing_mimes;
}
Thread Starter
lohic
(@lohic)
Hello,
and thanks for your response. I’ll make the plugin and tell you what happen !
I don’t find any mu-plugins folder only plugins.
Is it normal (I use wordpress multisite and not the wordpress Mu extension)
Thread Starter
lohic
(@lohic)
Ok, I made the plugin, I can upload SVG as before, but when i’m going on my page the file still download instead of showing.
I’m using this syntax :
<object id="svg-13927" width="100%" height="100%" data="http://www.mydomain.com/files/2012/05/myfile.svg"></object>
But the real file URL is :
http://mydomain.com/wp-content/blogs.dir/6/files/2012/05/myfile.svg
It seems that ms-files.php force it to download with a php header. Is there a way to change that without editing ms-files.php ?
Ugh.
No. In 3.5, we do away with the ms-files stuff, but in your case, you may either have to wait for that or continue to use the full path.
Thread Starter
lohic
(@lohic)
Ho ok,
It’s a good news that this method fill stop with the 3.5.
Have you any idea about the release date, or where I can find some info on it. By this way we’ll be able to get roadmap….
Thanks again.
Thread Starter
lohic
(@lohic)
Oups sorry, just saw the wordpress roadmap and the 5 december 2012 fore the 3.5 release.
I think we’ll be able to wait for this functionality.
You could try it on Beta 1 for now?
Thread Starter
lohic
(@lohic)
Ok, as soon as I have a little time, I’ll test it a say you how it works !