i'm unable to create a download file (mp3) via the backend, I always get an "Invalid filetype" error.
I've checked my filetype and MIME Type via PHP it's "audio/mpeg"
I've added "mp3" to the list of allowed filetypes in the server settings tab
I've added varios mime-type to the list of allowed mime-types in the server settings tab
Code: Select all
text/plain
image/png
image/jpeg
image/gif
image/bmp
image/vnd.microsoft.icon
image/tiff
image/svg+xml
application/zip
application/x-rar-compressed
application/x-msdownload
application/vnd.ms-cab-compressed
audio/mpeg
audio/mpeg3
audio/x-mpeg-3
video/mpeg
video/x-mpeg
audio/wav
audio/x-wav
video/quicktime
application/pdf
image/vnd.adobe.photoshop
application/postscript
application/msword
application/rtf
application/vnd.ms-excel
application/vnd.ms-powerpoint
application/vnd.oasis.opendocument.text
application/vnd.oasis.opendocument.spreadsheet
Code: Select all
// Allowed file extension types
$allowed = array(
'jpg',
'jpeg',
'gif',
'png',
'mp3'
);
if (!in_array(utf8_strtolower(utf8_substr(strrchr($filename, '.'), 1)), $allowed)) {
$json['error'] = $this->language->get('error_filetype');
}
// Allowed file mime types
$allowed = array(
'image/jpeg',
'image/pjpeg',
'image/png',
'image/x-png',
'image/gif',
'audio/mpeg'
);
What am I doing wrong, or is this a bug?
cheers