title: Disable button while Uploading files in DropZone
body: <p>I am trying to disable a button when uploading started in dropzone and enable that button after completion of file upload.</p>
  
  <p>I can enable button in success event. but after starting upload; which event i can disable button?</p>
  
  <p>my code is </p>
  
  <pre><code>    //Simple Dropzonejs 
           $("#dZUpload").dropzone({
               url: "hn_SimpeFileUploader.ashx",
               maxFiles: 100,
               maxFilesize: 2,
               addRemoveLinks: false,
               acceptedFiles: "application/pdf",
               autoProcessQueue: false,                  
               success: function(file, response) {
                    var submit2 = document.getElementById('&lt;%= UploadButton.ClientID %&gt;');
                    submit2.disabled = false;     
                   var imgName = response;
                   file.previewElement.classList.add("dz-success");
                   console.log("Successfully uploaded :" + imgName);
  
                   var totalfilesize = 0;
                   var obj = {};
                   obj.name = file.name;
                   $.ajax({
                       type: "POST",
                       url: "DUpload.aspx/SendP",
                       data: JSON.stringify(obj),
                       contentType: "application/json; charset=utf-8",
                       dataType: "json",
                       success: function(r) {
                           //alert(r.d);
                       }
                   });
  
               },
               error: function(file, response) {
                   file.previewElement.classList.add("dz-error");
               }
           });
  
  
       });
  </code></pre>