Dropzone.autoDiscover = false; $(function () { var myDropzone = new Dropzone("#dropzone"); //console.log(myDropzone.options); if (maxUploadFileSize !== undefined) myDropzone.options.maxFilesize = maxUploadFileSize; myDropzone.options.timeout = 0, myDropzone.on("sending", function(file, xhr, formData) { if(document.getElementById("uploadcode")) formData.append("uploadcode", document.getElementById("uploadcode").value); }); myDropzone.on('error', function(file, response) { alert("Error: "+response.reason); }); myDropzone.on("success", function (file, response) { console.log("raw response: " + response); if (response == null || response == "null") $("#uploadinfo").append("") else { var o = response; if (o.status == 'ok') $("#uploadinfo").append("") else if (o.status == 'err') $("#uploadinfo").append("") console.log(o) } }); document.onpaste = function (event) { var items = (event.clipboardData || event.originalEvent.clipboardData).items; for (index in items) { var item = items[index]; if (item.kind === 'file') { // adds the file to your dropzone instance myDropzone.addFile(item.getAsFile()) } } } })