【问题标题】:Support DXF file WordPress支持 DXF 文件 WordPress
【发布时间】:2020-07-22 00:01:01
【问题描述】:

我发现此代码支持 WordPress 媒体库中的 .dwg 文件。

function custom_upload_mimes ( $existing_mimes=array() ) {
    $existing_mimes['dwg'] = 'image/vnd.dwg';
    return $existing_mimes;
}
add_filter('upload_mimes', 'custom_upload_mimes');

我需要添加什么来支持.dxf 文件?

【问题讨论】:

    标签: wordpress file file-upload upload media-library


    【解决方案1】:

    试试这个:

    function add_dxf_support($mimes) {
        $mimes['dxf'] = 'application/dxf';
        return $mimes;
    }
    add_filter('upload_mimes','add_dxf_support');
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-26
    • 2010-11-03
    • 1970-01-01
    • 1970-01-01
    • 2020-04-13
    相关资源
    最近更新 更多