My question is regarding Uploading Files using the link
I have the following JS code
$('#arquivoCliente').fileinput({
language: 'pt-BR',
uploadAsync: false,
showPreview: false,
maxFileSize: 200,
uploadUrl: 'upload.php',
allowedFileExtensions : ['PDF', 'pdf']
uploadExtraData: function() {
return {
id: tempIDCliente
};
}
});
My php is all ok, it's saving the file and everything. What I can not do is. As you can see my code is set to accept only the PDF extension. If the user chooses another extension, the send button is disabled.
But this option is only working if I comment the uploadUrl line, as in the example below.
$('#arquivoCliente').fileinput({
language: 'pt-BR',
uploadAsync: false,
showPreview: false,
maxFileSize: 200,
// uploadUrl: 'upload.php',
allowedFileExtensions : ['PDF', 'pdf']
uploadExtraData: function() {
return {
id: tempIDCliente
};
}
});
Reviewedassuch