dropzone js code example
Example 1: 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>
Example 2: drop zone js
<form action="/file-upload"
class="dropzone"
id="my-awesome-dropzone"></form>