summaryrefslogtreecommitdiff
path: root/www/static/js/dropzone.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/static/js/dropzone.js')
-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);
}
}