<form id="my-awesome-dropzone" action="/target" class="dropzone"></form>
// "myAwesomeDropzone" is the camelized version of the ID of your HTML element Dropzone.options.myAwesomeDropzone = { maxFilesize: 1 };
// instantiate manually new Dropzone("div#my-dropzone", { /* options */ });
Dropzone.options.myDropzone({ init: function() { this.on("error", function(file, message) { alert(message); }); } }); // or if you need to access a Dropzone somewhere else: var myDropzone = Dropzone.forElement("div#my-dropzone"); myDropzone.on("error", function(file, message) { alert(message); });
Chrome 7+
Firefox 4+
IE 10+
Opera 12+
Safari 6+