<form action="/target" class="dropzone" id="my-great-dropzone"></form>
<script>
Dropzone.options.myGreatDropzone = { // camelized version of the `id`
paramName: "file", // The name that will be used to transfer the file
maxFilesize: 2, // MB
accept: function(file, done) {
if (file.name == "justinbieber.jpg") {
done("Naha, you don't.");
}
else { done(); }
}
};
</script>
Something like this