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?