Personally I use the UPLOADIFY
plugin to send files but I have just discovered that it is not sending when the file has a .MP3 extension. If I give a var_dump ($ _ FILES) it returns empty to me when it is a .MP3 file if I pass for example a PDF var_dump ($ _ FILES); back filled?
$(".upload").uploadify({
'uploader': '/public/js/Uploadify2.1.4/uploadify.swf',
'script': '/uploadArquivo',
'cancelImg': '/public/js/Uploadify2.1.4/cancel.png',
'fileExt': '*.pdf; *.mp3;*.wav',
'multi': false,
'auto': true,
'width': 120,
'hideButton': false,
'buttonText': 'Procurar',
'rollover': false,
'sizeLimit': '10485760', //Limitado a 5mb por arquivo. Valores expressos em bytes
'displayData': 'speed',
'queueSizeLimit': 1,
'uploadLimit': 1,
'onUploadStart': function(file) {
console.log('=>'+file);
},
'onComplete': function(event, queueID, fileObj, response, data) {
if (response == "erro") {
alert("Problemas no upload deste audio.");
} else {
$("#imgfoto1").attr("src", "<?php echo AUDIO ?>");
$("#arquivo").attr("value", response);
}
},
'onError': function(a, b, c, d) {
if (d.type === "File Size")
alert("O arquivo " + c.name + " excede o tamanho máximo. \nO Limite é de " + Math.round(d.info / (1024 * 1024)) + "Mb");
else
alert("Erro!!! " + d.type + ": " + d.text);
}
});
In route uploadFile only has a var_dump ($ _ FILES).