I use DropZone js for file uploads,I have a custom button for processQueue()
button to process the files manually after uploading.
if (myDropzone.files.length == 0){
$('#upload_dropzone').prop("disabled", true);
} else if(myDropzone.getRejectedFiles().length > 0) {
alert("The attached file is invalid");
} else {
$('#upload_dropzone').prop("disabled", false);
}
$('#upload_dropzone').on('click',function(e){
e.preventDefault();
myDropzone.processQueue();
});
What I want to do is:
If the dropzone field is NOT empty, then remove the disabled
attribute. After selecting the files the button is still disabled