//----------------------------------------------------------------- // Dropzone options //----------------------------------------------------------------- //# Prevent Dropzone from auto discovering this element. This is useful //# when you want to create the Dropzone programmatically later. //Dropzone.options.myDropzone = false; // //# Disable auto discover for all elements: //Dropzone.autoDiscover = false; //# "myAwesomeDropzone" is the camelized version of the HTML element's ID //# Eg: Dropzone.options.myAwesomeDropzone = { ... } Dropzone.options.dropzone1 = { url: "upload.php", // Set the target url paramName: "file", // The name that will be used to transfer the file maxFilesize: 2, // MB thumbnailWidth: 80, thumbnailHeight: 80, parallelUploads: 20, dictDefaultMessage: "Drop files here or click to upload", previewTemplate: previewTemplate, //previewTemplate: document.querySelector('#preview-template').innerHTML, //autoQueue: false, // Make sure the files aren't queued until manually added //previewsContainer: "#previews", // Define the container to display the previews //clickable: ".fileinput-button", // Define the element that should be used as click trigger to select files. accept: function(file, done) { var errMsg = validateTargetFilename(file.name); if (errMsg.length > 0) { done(errMsg); console.log(errMsg); $("#cmd-status").html('