I am using dropzone.js in magento to upload files. the progress bar is working fine but i want to show the progress percentage too. Following function is adding style to a span.
uploadprogress: function(a, b) {
var c, d, e, f, g;
if (a.previewElement) {
for (f = a.previewElement.querySelectorAll("[data-dz-uploadprogress]"), g = [], d = 0, e = f.length; e > d; d++) c = f[d], g.push("PROGRESS" === c.nodeName ? c.value = b : c.style.width = "" + b + "%");
return g
}
},
which add the style="width:xx%" in the following html.
I also want to show the % result which g return in above code in span as text so that the user can see the numbers too.
Dropzone.options.dropzoneIDHere = { uploadprogress: function(file, progress, bytesSent) { } };
– Crucifix