From 7c8be0341ff1378662dc7617889356ce9572dd60 Mon Sep 17 00:00:00 2001 From: Pitu Date: Wed, 18 Jan 2017 22:08:59 -0300 Subject: [PATCH] Cuter file upload progress --- pages/home.html | 10 +++------- public/js/upload.js | 3 ++- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/pages/home.html b/pages/home.html index 85e2493..2a1fae8 100644 --- a/pages/home.html +++ b/pages/home.html @@ -36,17 +36,13 @@
+
-

-
-
-

-
-
- +

+
diff --git a/public/js/upload.js b/public/js/upload.js index 2638ef8..d6d9b9d 100644 --- a/public/js/upload.js +++ b/public/js/upload.js @@ -109,7 +109,8 @@ upload.prepareDropzone = function(){ // Update the total progress bar dropzone.on('uploadprogress', function(file, progress) { - file.previewElement.querySelector('.progress').style.width = progress + '%'; + file.previewElement.querySelector('.progress').setAttribute('value', progress); + file.previewElement.querySelector('.progress').innerHTML = progress + '%'; }); dropzone.on('success', function(file, response) {