0
Personal use the plugin UPLOADIFY
to send files, but I just discovered that it is not sending when the file has the extension . MP3. If I give a var_dump($_FILES)
it comes back empty to me when it is a file. MP3 if I pass for example a PDF o var_dump($_FILES);
completed lap?
$(".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);
}
});
On the uploadArchive route there is only one var_dump($_FILES)
.
I thought about it, but usually PHP sends an error message and crashes the script... weird... - Just a note, I tested yes and with me it worked normally.
– Guilherme Nascimento