CC-6102: Can't upload M4A and FLAC anymore - rejected by dropzone
This commit is contained in:
parent
0752e78b2c
commit
b99ec51863
2 changed files with 9 additions and 2 deletions
|
@ -95,8 +95,14 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
}
|
||||
$view->headScript()->appendScript("var userType = '$userType';");
|
||||
|
||||
// Dropzone also accept file extensions and doesn't correctly extract certain mimetypes (eg. FLAC - try it),
|
||||
// so we append the file extensions to the list of mimetypes and that makes it work.
|
||||
$mimeTypes = FileDataHelper::getAudioMimeTypeArray();
|
||||
$view->headScript()->appendScript("var acceptedMimeTypes = ['".implode("','", array_keys($mimeTypes))."'];");
|
||||
$fileExtensions = array_values($mimeTypes);
|
||||
foreach($fileExtensions as &$extension) {
|
||||
$extension = '.' . $extension;
|
||||
}
|
||||
$view->headScript()->appendScript("var acceptedMimeTypes = " . json_encode(array_merge(array_keys($mimeTypes), $fileExtensions)) . ";");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue