nineskeletor/assets/dropzone.js

19 lines
588 B
JavaScript
Raw Normal View History

2022-07-21 16:15:47 +02:00
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;
});