I'm using the jquery file upload plugin (https://blueimp.github.io/jQuery-File-Upload/). This one is working pretty well when testing the demo on my own server, however, I would like to use it in a different way.
Instead of using the progressall function, and the classic submit function, I do use it this way:
var url = "http://localhost:8080/upload"
$('#fileupload').fileupload({
url: url,
forceIframeTransport: false,
add: function (e, data) {
$("#container").data("data2upload", data);
}
})
$("#upbtn").click(function(){
$("#cont").data("data2upload").submit();
});
it allows me to add as many file I want and to synch the upload on a click. When I want to display the progress, I do like this:
var tloaded = $('#fileupload').fileupload('progress').loaded,
t2load = $('#fileupload').fileupload('progress').total;
however, the value of the loaded is 0 until the end where it comes to t2load. What is enoying for the final user. (I'm not cross-domain). What am I doing wrong ?
thanks, Jerome
Can you use something like what I have below (from the DOCs)?
Note the
progress
method above