picEdit
picEdit copied to clipboard
Progress indicator on upload
I have changed request.onprogress in the _formsubmit to give a working progress user comfort.
//send request
var request = new XMLHttpRequest();
request.upload.onprogress = function (e) {
if(e.lengthComputable) var total = e.total;
else var total = Math.ceil(inputblob.size * 1.3);
var progress = Math.ceil(((e.loaded)/total)*100);
if (progress > 100) progress = 100;
_this.set_messagebox("Please Wait... Uploading... " + progress + "% Uploaded.", false, false);
};
Sorry, I don't yet know how to use github!
Thanks. I'm using it. Works great! It's important when uploading large files so the user knows that the server is actually doing something ;-)