summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroweissbarth2014-07-21 20:52:39 +0200
committeroweissbarth2014-07-21 20:52:39 +0200
commitcfc38d8cd1f5d7d1114fc1d4bd9124109b08ab49 (patch)
tree0c9f63f1b1b6b1b0837343787dce7642d6e8a09f
parentdc27f9180783a8048c2dab5aea8ffbea32f2531c (diff)
downloadfiles.iamfabulous.de-cfc38d8cd1f5d7d1114fc1d4bd9124109b08ab49.tar.gz
fixed progressbar....hopefully
-rw-r--r--www/static/js/dropzone.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/www/static/js/dropzone.js b/www/static/js/dropzone.js
index ead87c6..ba9b429 100644
--- a/www/static/js/dropzone.js
+++ b/www/static/js/dropzone.js
@@ -83,7 +83,6 @@ var vfs_upload_queue = [];
xhr.onload=function(){
if (xhr.status==200){
- alert("upload done");
}else{
alert("upload failed");
}
@@ -91,15 +90,14 @@ var vfs_upload_queue = [];
xhr.upload.onprogress= function(e){
if(e.lengthComputable){
- document.getElementById("progressBar-"+this.filename).value = Math.ceil(e.loaded/e.total)*100;
- document.getElementById("progress-text").innerHTML = Math.ceil(e.loaded/e.total)*100 + "%";
+ document.getElementById("progressBar-"+this.filename).value = Math.floor(e.loaded/e.total*100);
+ console.log(Math.floor(done/total*100)+"%");
}else{
alert("cant compute progress");
}
};
xhr.open('post', document.URL, true);
- xhr.overrideMimeType('text/plain; charset=x-user-defined-binary');
xhr.send(data);
}
}