Skip to content

Instantly share code, notes, and snippets.

@enyo
Created February 6, 2013 23:37
Show Gist options
  • Save enyo/4726916 to your computer and use it in GitHub Desktop.
Save enyo/4726916 to your computer and use it in GitHub Desktop.
Tweek dropzone to use another container for file previews
Dropzone.myDropzone.options = {
addedfile: function(file) {
file.previewTemplate = $(this.options.previewTemplate);
this.element.find(".previews").append(file.previewTemplate);
file.previewTemplate.find(".filename span").text(file.name);
file.previewTemplate.find(".details").append($("<div class=\"size\">" + (this.filesize(file.size)) + "</div>"));
}
};
@viniciusbig
Copy link

nice! I don't know how but Google brought me here..

The same for me! LOL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment