I am currently working with Dropzone and have implemented the following code:
<form action="#" class="dropzone" ></form>
Within the JavaScript code, the dropzone function is set to upload images only when a button with the id "startUpload" is clicked.
Dropzone.autoDiscover = false;
$(function() {
var myDropzone = new Dropzone(".dropzone", {
url: "upload_hotel_image.php",
paramName: "file",
maxFilesize: 20,
maxFiles: 20,
acceptedFiles: "image/*",
autoProcessQueue: false,
});
$(document).ready(function(){
$('#startUpload').click(function(){
myDropzone.processQueue();
});
});
});
My current challenge is figuring out how to add additional data to be sent along with the image uploads in Dropzone. For example, I need to include a description for each image that is uploaded.