Failed to upload .wma file

Somebody, help me.

I'm uploading a .wma file in WordPress and I'm getting the error "This file type is not allowed".

But I've added support for .wma file types as follows:

 
 
 
// 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, however, can be uploaded after adding the mime type, but .wma cannot.
What's the solution?

Comments

Add comment
  • Comment list is empty

Contact Us

020-2206-9892

QQ咨询:1025174874

E-mail: info@361sale.com

Working hours: Monday to Friday, 9:30-18:30, holidays off

Customer Service