admin管理员组文章数量:1389903
I am trying to add a download link to an .stl
file after I allowed it in the mime
variable.
I created a product with a download link and it does work but I want to give a direct access to the file in order to put it on one of my posts.
I searched google and tried many things using the functions.php
and the .htaccess
file but none worked.
When I'm trying to directly access the file I am redirected to a 404 page.
This is the code I used to add support for the .stl
file:
function my_myme_types($mime_types){
$mime_types['stl'] = 'application/vnd.ms-pki.stl'; //Adding stl extension
$mime_types['rar'] = 'application/x-rar-compressed'; //Adding rar files
$mime_types['zip'] = 'application/zip '; //Adding zip files
return $mime_types;
}
add_filter('upload_mimes', 'my_myme_types', 1, 1);
If needed any information please let me know and I will add those.
本文标签: Added support for stl file but cannot download
版权声明:本文标题:Added support for .stl file but cannot download 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744621018a2616023.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论