<div style="width: 100%" class="dropzone image" id="image" data-field="image"> <input type="hidden" name="image"> </div> code example
Example: dropzone accepted files
<script type="text/javascript">
Dropzone.options.dropzone = {
accept: function(file, done) {
console.log(file);
if (file.type != "image/jpeg") {
done("Error! Files of this type are not accepted");
}
else { done(); }
}
}
</script>