上传 .wma 文件失败-WordPress问题论坛-WordPress-光子社区 | 技术交流与生活分享的理想平台

上传 .wma 文件失败

有人吗,帮帮我

我在 WordPress中上传 .wma 文件,但收到错误“不允许此文件类型”

但我已经添加了对.wma文件类型的支持,如下所示:

 // Add this filter to allow mime file uploads
   add_filter('upload_mimes', array($this, 'allow_mime_uploads')); 

    public function allow_mime_uploads($mimes) {
        $mimes['epub'] = 'application/epub+zip';
        $mimes['djvu'] = 'image/vnd.djvu';
        $mimes['jfif'] = 'image/jpeg';
        $mimes['htm'] = 'text/html';
        $mimes['html'] = 'text/html';
        $mimes['svg'] = 'image/svg+xml';
        $mimes['eps'] = 'application/postscript';
                $mimes['psd'] = 'image/vnd.adobe.photoshop';
                $mimes['mobi'] = 'application/x-mobipocket-ebook';
                $mimes['vob'] = 'video/dvd';
                $mimes['dwg'] = 'image/vnd.dwg';
                $mimes['wma'] = 'audio/x-ms-wma';

        return $mimes;
    }  

不过.dwg,在添加mime类型后可以上传,但.wma则不行。

d2b5ca33bd20240821175217

 

请登录后发表评论