sftpbrowser/assets/dropzone.js

21 lines
628 B
JavaScript
Raw Normal View History

2022-12-23 16:27:07 +01:00
require('dropzone/dist/dropzone.css');
const { Dropzone } = require("dropzone");
document.addEventListener('DOMContentLoaded', function() {
var elt = document.getElementById('mydropzone');
maxFiles=elt.getAttribute("data-maxFiles");
if(maxFiles!=1) maxFiles=null;
var mydropzone = new Dropzone(elt, {
acceptedMimeTypes: $(elt).data("acceptedMimeTypes"),
maxFiles: maxFiles,
init: function() {
dropzoneinit(this);
},
success: function( file, response ){
dropzonesuccess(file,response);
},
});
window.mydropzone=mydropzone;
});