I have a popup modal. I need each time popup opens it will allow only 1 successful file upload. That mean if again popup opens (without refreshing the page) it will allow again a single file upload. Now this is my code-
if(typeof fileuploadobj != 'undefined') {
jQuery('#fileupload table tbody tr.template-download').remove();
jQuery('#fileupload table tbody tr.template-upload').remove();
//fileuploadobj.destroy;
// jQuery("#fileupload").fileupload('destroy');
}
// Initialize the jQuery File Upload widget:
fileuploadobj = jQuery('#fileupload').fileupload({
acceptFileTypes: /(.+wav)/i,
dropZone: jQuery('.upload_dropzone'),
autoUpload: true,
maxNumberOfFiles: 1,
formData: {some_id: 999}
});
now for each even upload (2nd, 4th etc) progress bar moving right to left. How to solve this. Please help.
Finally I found the reason of this issue. Basically all my files were very small (few 100 kbs). First upload shows the progress bar correctly and progressbar reached to 100%. When I start second upload progress bar gently comes back to 0% and in this mean time upload is being completed (small size). So progress bar looks like its running backward. I tested using some big files and found it comes back to 0 and then shows original progress.