npm or yarn
This is how I use the library myself
$ npm install --save dropzone$ yarn add dropzone<!-- Example of a form that Dropzone can take over -->
<form action="/target" class="dropzone"></form>JavaScript
// If you are using JavaScript/ECMAScript modules:
import Dropzone from "dropzone";
// If you are using CommonJS modules:
const { Dropzone } = require("dropzone");
// If you are using an older version than Dropzone 6.0.0,
// then you need to disabled the autoDiscover behaviour here:
Dropzone.autoDiscover = false;
let myDropzone = new Dropzone("#my-form");
myDropzone.on("addedfile", file => {
console.log(`File added: ${file.name}`);
});CSS
Last updated