tllewellyn tllewellyn - 1 year ago 113
Javascript Question

dropzone.js Suppress progress bar when retrieving from server

Using dropzone.js, I've had no issues getting it to work, including retrieving images already previously uploaded to the server.

The only problem I have is when I retrieve those files from the server on a page refresh (meaning they weren't uploaded during this page's current usage), the upload progress bar is permanently displayed. Is there any way to suppress the progress bar for images previously uploaded? I would like to continue to use the progress bars when uploading and don't want to remove the css from the template.

Not that it's helpful in this case, but here is the code I'm using to retrieve the files and display them in a remote previews div.

Dropzone.options.myDropzone = {
previewsContainer: document.getElementById("previews"),
init: function()
thisDropzone = this;

$.get('../cgi/fileUpload.php', function(data)
$.each(data, function(key,value)
var mockFile = { name:, size: value.size};, mockFile);, mockFile,;

var strippedName = (;
fileList[i] = {"serverFileName" :, "fileName" :, "fileSize" : value.size, "fileId" : i };

var removeButton = Dropzone.createElement("<button class=\"btn btnremove\" style=\"width: 100%;\">Remove file</button>");

var _this = this;

removeButton.addEventListener("click", function(e)





url: "../cgi/fileUpload.php"

Answer Source

Answered! Chose to just remove the divs using jquery after they were delivered:


Not overly elegant, but it works.