nineskeletor/assets/dropzone.js

19 lines
588 B
JavaScript
Executable File

require('dropzone/dist/dropzone.css');
/*
window.Dropzone = require('dropzone/dist/dropzone.js');
*/
const { Dropzone } = require("dropzone");
document.addEventListener('DOMContentLoaded', function() {
var elt = document.getElementById('mydropzone');
console.log($(elt).data("maxfiles"))
var mydropzone = new Dropzone(elt, {
acceptedMimeTypes: $(elt).data("acceptedMimeTypes"),
maxFiles: $(elt).data("maxFiles"),
success: function( file, response ){
dropzonesuccess(file,response);
},
});
global.mydropzone=mydropzone;
});