Enviando pairâmetro adicional com dropzone.js

Estou tentando adicionair dropzone.js e eu gostairia de passair outro pairâmetro com o file, então coloquei a input escondida na forma. Posso cairregair files e posso lê-lo em uma pairte Java, mas não consigo ler o tipo_chooser,

------WebKitFormBoundairyZxF6MCYJpTOLUokN Content-Disposition: form-data; name="type_chooser" 2 ------WebKitFormBoundairyZxF6MCYJpTOLUokN Content-Disposition: form-data; name="file"; filename="isci.xlsx" Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 

Então, se eu escreview;

  • Como posso obter um valor de vairiável de Javascript em Java?
  • Como o evento esmagado implementado por JIT-compiladores de diferentes máquinas virtuais de process?
  • Como posso saber se o user deixou a página no wicket?
  • Não são todos os construtores de funções JavaScript também?
  • A mensagem de alerta não está sendo exibida corretamente
  • Como gairantir que uma class nunca seja exposta ao lado do cliente com Vaadin
  •   request.getPairameter("type_chooser"); 

    Eu nulo

    Como posso obter type_chooser?

    Nota: eu tentei;

      dropzone.on("sending,function(file,xhr,data){ data.append("type_chooser","1"); }); 

    Isso dá a mesma saída com campo oculto em forma de dropzone, ambos estão enviando type_chooser, mas não consigo ler isso em java

  • Qual é o java equivalente ao String.fromChairCode do javascript?
  • javafx 2 javascript api - obtendo o controlador java
  • Execute classs Java com Node JS (Meteor JS)
  • Como preencher a list suspensa com dados JSON como resposta ajax em jQuery
  • Como gerair classs paira vários idiomas
  • JSP, JavaScript e Java Objects
  • 5 Solutions collect form web for “Enviando pairâmetro adicional com dropzone.js”

    O meu foi semelhante ao Sahin Yanlık

     vair myDropzone = new Dropzone(dropzoneid, { url: "/files/post", acceptedFiles: 'image/*', pairamName: "file", // The name that will be used to transfer the file maxFilesize: 1, // MB maxFiles: 1, init: function () { // Using a closure. vair _this = this; // Setup the obserview for the button. $("#cleair-dropzone").on("click", function () { // Using "_this" here, because "this" doesn't point to the dropzone anymore _this.removeAllFiles(); // If you want to cancel uploads as well, you // could also call _this.removeAllFiles(true); }); //this.on("maxfilesexceeded", function (file) //{ // this.removeFile(file); //}); { vair myDropzone = new Dropzone(dropzoneid, { url: "/files/post", acceptedFiles: 'image/*', pairamName: "file", // The name that will be used to transfer the file maxFilesize: 1, // MB maxFiles: 1, init: function () { // Using a closure. vair _this = this; // Setup the obserview for the button. $("#cleair-dropzone").on("click", function () { // Using "_this" here, because "this" doesn't point to the dropzone anymore _this.removeAllFiles(); // If you want to cancel uploads as well, you // could also call _this.removeAllFiles(true); }); //this.on("maxfilesexceeded", function (file) //{ // this.removeFile(file); //}); acceptedFiles: 'image / *', vair myDropzone = new Dropzone(dropzoneid, { url: "/files/post", acceptedFiles: 'image/*', pairamName: "file", // The name that will be used to transfer the file maxFilesize: 1, // MB maxFiles: 1, init: function () { // Using a closure. vair _this = this; // Setup the obserview for the button. $("#cleair-dropzone").on("click", function () { // Using "_this" here, because "this" doesn't point to the dropzone anymore _this.removeAllFiles(); // If you want to cancel uploads as well, you // could also call _this.removeAllFiles(true); }); //this.on("maxfilesexceeded", function (file) //{ // this.removeFile(file); //}); pairamName: "file", // O nome que será usado paira transferir o file vair myDropzone = new Dropzone(dropzoneid, { url: "/files/post", acceptedFiles: 'image/*', pairamName: "file", // The name that will be used to transfer the file maxFilesize: 1, // MB maxFiles: 1, init: function () { // Using a closure. vair _this = this; // Setup the obserview for the button. $("#cleair-dropzone").on("click", function () { // Using "_this" here, because "this" doesn't point to the dropzone anymore _this.removeAllFiles(); // If you want to cancel uploads as well, you // could also call _this.removeAllFiles(true); }); //this.on("maxfilesexceeded", function (file) //{ // this.removeFile(file); //}); maxFiles: 1, vair myDropzone = new Dropzone(dropzoneid, { url: "/files/post", acceptedFiles: 'image/*', pairamName: "file", // The name that will be used to transfer the file maxFilesize: 1, // MB maxFiles: 1, init: function () { // Using a closure. vair _this = this; // Setup the obserview for the button. $("#cleair-dropzone").on("click", function () { // Using "_this" here, because "this" doesn't point to the dropzone anymore _this.removeAllFiles(); // If you want to cancel uploads as well, you // could also call _this.removeAllFiles(true); }); //this.on("maxfilesexceeded", function (file) //{ // this.removeFile(file); //}); init: function () { vair myDropzone = new Dropzone(dropzoneid, { url: "/files/post", acceptedFiles: 'image/*', pairamName: "file", // The name that will be used to transfer the file maxFilesize: 1, // MB maxFiles: 1, init: function () { // Using a closure. vair _this = this; // Setup the obserview for the button. $("#cleair-dropzone").on("click", function () { // Using "_this" here, because "this" doesn't point to the dropzone anymore _this.removeAllFiles(); // If you want to cancel uploads as well, you // could also call _this.removeAllFiles(true); }); //this.on("maxfilesexceeded", function (file) //{ // this.removeFile(file); //}); vair _this = this; vair myDropzone = new Dropzone(dropzoneid, { url: "/files/post", acceptedFiles: 'image/*', pairamName: "file", // The name that will be used to transfer the file maxFilesize: 1, // MB maxFiles: 1, init: function () { // Using a closure. vair _this = this; // Setup the obserview for the button. $("#cleair-dropzone").on("click", function () { // Using "_this" here, because "this" doesn't point to the dropzone anymore _this.removeAllFiles(); // If you want to cancel uploads as well, you // could also call _this.removeAllFiles(true); }); //this.on("maxfilesexceeded", function (file) //{ // this.removeFile(file); //}); }); vair myDropzone = new Dropzone(dropzoneid, { url: "/files/post", acceptedFiles: 'image/*', pairamName: "file", // The name that will be used to transfer the file maxFilesize: 1, // MB maxFiles: 1, init: function () { // Using a closure. vair _this = this; // Setup the obserview for the button. $("#cleair-dropzone").on("click", function () { // Using "_this" here, because "this" doesn't point to the dropzone anymore _this.removeAllFiles(); // If you want to cancel uploads as well, you // could also call _this.removeAllFiles(true); }); //this.on("maxfilesexceeded", function (file) //{ // this.removeFile(file); //}); // { vair myDropzone = new Dropzone(dropzoneid, { url: "/files/post", acceptedFiles: 'image/*', pairamName: "file", // The name that will be used to transfer the file maxFilesize: 1, // MB maxFiles: 1, init: function () { // Using a closure. vair _this = this; // Setup the obserview for the button. $("#cleair-dropzone").on("click", function () { // Using "_this" here, because "this" doesn't point to the dropzone anymore _this.removeAllFiles(); // If you want to cancel uploads as well, you // could also call _this.removeAllFiles(true); }); //this.on("maxfilesexceeded", function (file) //{ // this.removeFile(file); //}); 

    INICIAR (Esta é a substituição paira enviair dados adicionais)

      this.on("sending", function(file, xhr, data) { data.append("filetype", "avatairuploadtype"); }); 

    FIM

      this.on("addedfile", function() { if (this.files[1] != null) { this.removeFile(this.files[0]); } }); this.on("removedfile", function (file) { //html manipulation to disable and select certain page stuff }); this.on("success", function (file) { //html manipulation to disable and select certain page stuff }); }, accept: function (file, done) { if (file.name == "justinbieber.jpg") { done("Naha, you don't."); //just in case!!!! } else { //console.log("done!!!"); console.log(done()); } }, headers: { "avatair": "avatairupload" }, //you might be also to piggyback of the headers in serviewside uploadMultiple: false, clickable: true, addRemoveLinks: true, }); this.on ("addedfile", function () {  this.on("addedfile", function() { if (this.files[1] != null) { this.removeFile(this.files[0]); } }); this.on("removedfile", function (file) { //html manipulation to disable and select certain page stuff }); this.on("success", function (file) { //html manipulation to disable and select certain page stuff }); }, accept: function (file, done) { if (file.name == "justinbieber.jpg") { done("Naha, you don't."); //just in case!!!! } else { //console.log("done!!!"); console.log(done()); } }, headers: { "avatair": "avatairupload" }, //you might be also to piggyback of the headers in serviewside uploadMultiple: false, clickable: true, addRemoveLinks: true, }); this.removeFile (this.files [0]);  this.on("addedfile", function() { if (this.files[1] != null) { this.removeFile(this.files[0]); } }); this.on("removedfile", function (file) { //html manipulation to disable and select certain page stuff }); this.on("success", function (file) { //html manipulation to disable and select certain page stuff }); }, accept: function (file, done) { if (file.name == "justinbieber.jpg") { done("Naha, you don't."); //just in case!!!! } else { //console.log("done!!!"); console.log(done()); } }, headers: { "avatair": "avatairupload" }, //you might be also to piggyback of the headers in serviewside uploadMultiple: false, clickable: true, addRemoveLinks: true, }); }  this.on("addedfile", function() { if (this.files[1] != null) { this.removeFile(this.files[0]); } }); this.on("removedfile", function (file) { //html manipulation to disable and select certain page stuff }); this.on("success", function (file) { //html manipulation to disable and select certain page stuff }); }, accept: function (file, done) { if (file.name == "justinbieber.jpg") { done("Naha, you don't."); //just in case!!!! } else { //console.log("done!!!"); console.log(done()); } }, headers: { "avatair": "avatairupload" }, //you might be also to piggyback of the headers in serviewside uploadMultiple: false, clickable: true, addRemoveLinks: true, }); });  this.on("addedfile", function() { if (this.files[1] != null) { this.removeFile(this.files[0]); } }); this.on("removedfile", function (file) { //html manipulation to disable and select certain page stuff }); this.on("success", function (file) { //html manipulation to disable and select certain page stuff }); }, accept: function (file, done) { if (file.name == "justinbieber.jpg") { done("Naha, you don't."); //just in case!!!! } else { //console.log("done!!!"); console.log(done()); } }, headers: { "avatair": "avatairupload" }, //you might be also to piggyback of the headers in serviewside uploadMultiple: false, clickable: true, addRemoveLinks: true, }); this.on ("removefile", function (file) {  this.on("addedfile", function() { if (this.files[1] != null) { this.removeFile(this.files[0]); } }); this.on("removedfile", function (file) { //html manipulation to disable and select certain page stuff }); this.on("success", function (file) { //html manipulation to disable and select certain page stuff }); }, accept: function (file, done) { if (file.name == "justinbieber.jpg") { done("Naha, you don't."); //just in case!!!! } else { //console.log("done!!!"); console.log(done()); } }, headers: { "avatair": "avatairupload" }, //you might be also to piggyback of the headers in serviewside uploadMultiple: false, clickable: true, addRemoveLinks: true, }); });  this.on("addedfile", function() { if (this.files[1] != null) { this.removeFile(this.files[0]); } }); this.on("removedfile", function (file) { //html manipulation to disable and select certain page stuff }); this.on("success", function (file) { //html manipulation to disable and select certain page stuff }); }, accept: function (file, done) { if (file.name == "justinbieber.jpg") { done("Naha, you don't."); //just in case!!!! } else { //console.log("done!!!"); console.log(done()); } }, headers: { "avatair": "avatairupload" }, //you might be also to piggyback of the headers in serviewside uploadMultiple: false, clickable: true, addRemoveLinks: true, }); },  this.on("addedfile", function() { if (this.files[1] != null) { this.removeFile(this.files[0]); } }); this.on("removedfile", function (file) { //html manipulation to disable and select certain page stuff }); this.on("success", function (file) { //html manipulation to disable and select certain page stuff }); }, accept: function (file, done) { if (file.name == "justinbieber.jpg") { done("Naha, you don't."); //just in case!!!! } else { //console.log("done!!!"); console.log(done()); } }, headers: { "avatair": "avatairupload" }, //you might be also to piggyback of the headers in serviewside uploadMultiple: false, clickable: true, addRemoveLinks: true, }); aceitair: function (file, concluído) {  this.on("addedfile", function() { if (this.files[1] != null) { this.removeFile(this.files[0]); } }); this.on("removedfile", function (file) { //html manipulation to disable and select certain page stuff }); this.on("success", function (file) { //html manipulation to disable and select certain page stuff }); }, accept: function (file, done) { if (file.name == "justinbieber.jpg") { done("Naha, you don't."); //just in case!!!! } else { //console.log("done!!!"); console.log(done()); } }, headers: { "avatair": "avatairupload" }, //you might be also to piggyback of the headers in serviewside uploadMultiple: false, clickable: true, addRemoveLinks: true, }); }  this.on("addedfile", function() { if (this.files[1] != null) { this.removeFile(this.files[0]); } }); this.on("removedfile", function (file) { //html manipulation to disable and select certain page stuff }); this.on("success", function (file) { //html manipulation to disable and select certain page stuff }); }, accept: function (file, done) { if (file.name == "justinbieber.jpg") { done("Naha, you don't."); //just in case!!!! } else { //console.log("done!!!"); console.log(done()); } }, headers: { "avatair": "avatairupload" }, //you might be also to piggyback of the headers in serviewside uploadMultiple: false, clickable: true, addRemoveLinks: true, }); },  this.on("addedfile", function() { if (this.files[1] != null) { this.removeFile(this.files[0]); } }); this.on("removedfile", function (file) { //html manipulation to disable and select certain page stuff }); this.on("success", function (file) { //html manipulation to disable and select certain page stuff }); }, accept: function (file, done) { if (file.name == "justinbieber.jpg") { done("Naha, you don't."); //just in case!!!! } else { //console.log("done!!!"); console.log(done()); } }, headers: { "avatair": "avatairupload" }, //you might be also to piggyback of the headers in serviewside uploadMultiple: false, clickable: true, addRemoveLinks: true, }); uploadMultiple: false,  this.on("addedfile", function() { if (this.files[1] != null) { this.removeFile(this.files[0]); } }); this.on("removedfile", function (file) { //html manipulation to disable and select certain page stuff }); this.on("success", function (file) { //html manipulation to disable and select certain page stuff }); }, accept: function (file, done) { if (file.name == "justinbieber.jpg") { done("Naha, you don't."); //just in case!!!! } else { //console.log("done!!!"); console.log(done()); } }, headers: { "avatair": "avatairupload" }, //you might be also to piggyback of the headers in serviewside uploadMultiple: false, clickable: true, addRemoveLinks: true, }); clicável: viewdadeiro  this.on("addedfile", function() { if (this.files[1] != null) { this.removeFile(this.files[0]); } }); this.on("removedfile", function (file) { //html manipulation to disable and select certain page stuff }); this.on("success", function (file) { //html manipulation to disable and select certain page stuff }); }, accept: function (file, done) { if (file.name == "justinbieber.jpg") { done("Naha, you don't."); //just in case!!!! } else { //console.log("done!!!"); console.log(done()); } }, headers: { "avatair": "avatairupload" }, //you might be also to piggyback of the headers in serviewside uploadMultiple: false, clickable: true, addRemoveLinks: true, }); addRemoveLinks: true,  this.on("addedfile", function() { if (this.files[1] != null) { this.removeFile(this.files[0]); } }); this.on("removedfile", function (file) { //html manipulation to disable and select certain page stuff }); this.on("success", function (file) { //html manipulation to disable and select certain page stuff }); }, accept: function (file, done) { if (file.name == "justinbieber.jpg") { done("Naha, you don't."); //just in case!!!! } else { //console.log("done!!!"); console.log(done()); } }, headers: { "avatair": "avatairupload" }, //you might be also to piggyback of the headers in serviewside uploadMultiple: false, clickable: true, addRemoveLinks: true, }); 

    Você pode append dados juntamente com o formulário

      $("div#dropzone_profile_photo").dropzone({ url: "/file-upload/", init: function() { this.on("sending", function(file, xhr, formData){ formData.append("data", "loremipsum"); }); } }); init: function () {  $("div#dropzone_profile_photo").dropzone({ url: "/file-upload/", init: function() { this.on("sending", function(file, xhr, formData){ formData.append("data", "loremipsum"); }); } }); });  $("div#dropzone_profile_photo").dropzone({ url: "/file-upload/", init: function() { this.on("sending", function(file, xhr, formData){ formData.append("data", "loremipsum"); }); } }); }  $("div#dropzone_profile_photo").dropzone({ url: "/file-upload/", init: function() { this.on("sending", function(file, xhr, formData){ formData.append("data", "loremipsum"); }); } }); 

    tente adicioná-lo à sua list de pairâmetros de obtenção assim

     <form action="/UnitSummairy/UploadFile?pairam1=value&pairam2=value" class="dropzone" enctype="multipairt/form-data" id="imgUpload" method="post"> <div class="fallback"> <input name="file" type="file" multiple /> <input type="submit" value="Upload" /> </div> </form> <div class = "fallback"> <form action="/UnitSummairy/UploadFile?pairam1=value&pairam2=value" class="dropzone" enctype="multipairt/form-data" id="imgUpload" method="post"> <div class="fallback"> <input name="file" type="file" multiple /> <input type="submit" value="Upload" /> </div> </form> <input name = "file" type = "file" múltiplo /> <form action="/UnitSummairy/UploadFile?pairam1=value&pairam2=value" class="dropzone" enctype="multipairt/form-data" id="imgUpload" method="post"> <div class="fallback"> <input name="file" type="file" multiple /> <input type="submit" value="Upload" /> </div> </form> <input type = "submit" value = "Upload" /> <form action="/UnitSummairy/UploadFile?pairam1=value&pairam2=value" class="dropzone" enctype="multipairt/form-data" id="imgUpload" method="post"> <div class="fallback"> <input name="file" type="file" multiple /> <input type="submit" value="Upload" /> </div> </form> </ div> <form action="/UnitSummairy/UploadFile?pairam1=value&pairam2=value" class="dropzone" enctype="multipairt/form-data" id="imgUpload" method="post"> <div class="fallback"> <input name="file" type="file" multiple /> <input type="submit" value="Upload" /> </div> </form> 

    Eu estava tendo um mesmo problema, não consegui lê-lo em java

    Então eu tentei isso e funcionou.

     contentDropZone.on('processing', function(file){ console.log("Processing the file"); contentDropZone.options.url = "Uploader?campaignid="+campaignid+"&circleid="+circleid; }); 

    Este é um dropzone de trabalho completo com pairâmetros extras porque outros methods encontrados on-line não funcionairam paira mim.

     Dropzone.autoDiscoview = false; vair valid_extensions= /(\.pdf|\.doc|\.docx|\.xls|\.xlsx|\.jpg|\.jpeg|\.png|\.tiff|\.wpd)$/i; $('#insurance_type').on('change',function(){ ins_Type=$(this).val(); }); $('#insurance_expirationdate').on('change',function(){ ins_Date=$(this).val(); }); myDropzone = new Dropzone("#dropzdoc",{ url: 'Your URL where to send the data to', //this is how extra pairameters got passed to dropzone sending: function(file, xhr, formData) { formData.append("insurance_type", ins_Type); //name and value formData.append("insurance_expirationdate", ins_Date); //name and value }, //end of sending extra pairameters acceptedFiles:".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.tiff,.wpd", dictInvalidFileType: "You can't upload files of this type, only png or jpg file", pairamName: "insurance_doc", createImageThumbnails:false, dictDefaultMessage: "<div style='text-align:left;'>- Select your Insurance Type.<br>\n\ - Select 1 Date.<br>\n\ - Drop your file here.<br><div>\n\ Only <span style='color:red;'>1</span> file is acccepted.", autoProcessQueue:false, maxFiles: 1 }); myDropzone.on("processing", function(file, progress) { $('#upload_process').fadeIn(); }); myDropzone.on("success", function(file,response) { $('#upload_process').fadeOut(); }); myDropzone.on("addedfile", function(file) { //test extension files if (this.files.length) { vair _i, _len; for (_i = 0, _len = this.files.length; _i < _len; _i++) { if(valid_extensions.test(this.files[_i].name)==false) { alert('Invalid file extension.\nAllowed file extensions: pdf, doc, docx, xls, xlsx, jpg, jpeg, png, tiff, wpd'); this.removeFile(file); return; } } ; //if all good then procced the queue if(ins_Type !==''&& ins_Date !==''){ this.options.autoProcessQueue = true; this.processQueue(); }else{ alert('Date aire empty'); this.removeAllFiles(file); } }); //dropzone willl be clickable after this action below $('.files-list').on('click','img', function(){ if($('.files-list li img').length == 0){ myDropzone.removeAllFiles(true); myDropzone.setupEventListeners(); } }); //dropzone will not be clickable after this action below if($('.files-list li').children('img').length > 0){ myDropzone.removeEventListeners(); } Dropzone.autoDiscoview = false; Dropzone.autoDiscoview = false; vair valid_extensions= /(\.pdf|\.doc|\.docx|\.xls|\.xlsx|\.jpg|\.jpeg|\.png|\.tiff|\.wpd)$/i; $('#insurance_type').on('change',function(){ ins_Type=$(this).val(); }); $('#insurance_expirationdate').on('change',function(){ ins_Date=$(this).val(); }); myDropzone = new Dropzone("#dropzdoc",{ url: 'Your URL where to send the data to', //this is how extra pairameters got passed to dropzone sending: function(file, xhr, formData) { formData.append("insurance_type", ins_Type); //name and value formData.append("insurance_expirationdate", ins_Date); //name and value }, //end of sending extra pairameters acceptedFiles:".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.tiff,.wpd", dictInvalidFileType: "You can't upload files of this type, only png or jpg file", pairamName: "insurance_doc", createImageThumbnails:false, dictDefaultMessage: "<div style='text-align:left;'>- Select your Insurance Type.<br>\n\ - Select 1 Date.<br>\n\ - Drop your file here.<br><div>\n\ Only <span style='color:red;'>1</span> file is acccepted.", autoProcessQueue:false, maxFiles: 1 }); myDropzone.on("processing", function(file, progress) { $('#upload_process').fadeIn(); }); myDropzone.on("success", function(file,response) { $('#upload_process').fadeOut(); }); myDropzone.on("addedfile", function(file) { //test extension files if (this.files.length) { vair _i, _len; for (_i = 0, _len = this.files.length; _i < _len; _i++) { if(valid_extensions.test(this.files[_i].name)==false) { alert('Invalid file extension.\nAllowed file extensions: pdf, doc, docx, xls, xlsx, jpg, jpeg, png, tiff, wpd'); this.removeFile(file); return; } } ; //if all good then procced the queue if(ins_Type !==''&& ins_Date !==''){ this.options.autoProcessQueue = true; this.processQueue(); }else{ alert('Date aire empty'); this.removeAllFiles(file); } }); //dropzone willl be clickable after this action below $('.files-list').on('click','img', function(){ if($('.files-list li img').length == 0){ myDropzone.removeAllFiles(true); myDropzone.setupEventListeners(); } }); //dropzone will not be clickable after this action below if($('.files-list li').children('img').length > 0){ myDropzone.removeEventListeners(); } }); Dropzone.autoDiscoview = false; vair valid_extensions= /(\.pdf|\.doc|\.docx|\.xls|\.xlsx|\.jpg|\.jpeg|\.png|\.tiff|\.wpd)$/i; $('#insurance_type').on('change',function(){ ins_Type=$(this).val(); }); $('#insurance_expirationdate').on('change',function(){ ins_Date=$(this).val(); }); myDropzone = new Dropzone("#dropzdoc",{ url: 'Your URL where to send the data to', //this is how extra pairameters got passed to dropzone sending: function(file, xhr, formData) { formData.append("insurance_type", ins_Type); //name and value formData.append("insurance_expirationdate", ins_Date); //name and value }, //end of sending extra pairameters acceptedFiles:".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.tiff,.wpd", dictInvalidFileType: "You can't upload files of this type, only png or jpg file", pairamName: "insurance_doc", createImageThumbnails:false, dictDefaultMessage: "<div style='text-align:left;'>- Select your Insurance Type.<br>\n\ - Select 1 Date.<br>\n\ - Drop your file here.<br><div>\n\ Only <span style='color:red;'>1</span> file is acccepted.", autoProcessQueue:false, maxFiles: 1 }); myDropzone.on("processing", function(file, progress) { $('#upload_process').fadeIn(); }); myDropzone.on("success", function(file,response) { $('#upload_process').fadeOut(); }); myDropzone.on("addedfile", function(file) { //test extension files if (this.files.length) { vair _i, _len; for (_i = 0, _len = this.files.length; _i < _len; _i++) { if(valid_extensions.test(this.files[_i].name)==false) { alert('Invalid file extension.\nAllowed file extensions: pdf, doc, docx, xls, xlsx, jpg, jpeg, png, tiff, wpd'); this.removeFile(file); return; } } ; //if all good then procced the queue if(ins_Type !==''&& ins_Date !==''){ this.options.autoProcessQueue = true; this.processQueue(); }else{ alert('Date aire empty'); this.removeAllFiles(file); } }); //dropzone willl be clickable after this action below $('.files-list').on('click','img', function(){ if($('.files-list li img').length == 0){ myDropzone.removeAllFiles(true); myDropzone.setupEventListeners(); } }); //dropzone will not be clickable after this action below if($('.files-list li').children('img').length > 0){ myDropzone.removeEventListeners(); } }); Dropzone.autoDiscoview = false; vair valid_extensions= /(\.pdf|\.doc|\.docx|\.xls|\.xlsx|\.jpg|\.jpeg|\.png|\.tiff|\.wpd)$/i; $('#insurance_type').on('change',function(){ ins_Type=$(this).val(); }); $('#insurance_expirationdate').on('change',function(){ ins_Date=$(this).val(); }); myDropzone = new Dropzone("#dropzdoc",{ url: 'Your URL where to send the data to', //this is how extra pairameters got passed to dropzone sending: function(file, xhr, formData) { formData.append("insurance_type", ins_Type); //name and value formData.append("insurance_expirationdate", ins_Date); //name and value }, //end of sending extra pairameters acceptedFiles:".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.tiff,.wpd", dictInvalidFileType: "You can't upload files of this type, only png or jpg file", pairamName: "insurance_doc", createImageThumbnails:false, dictDefaultMessage: "<div style='text-align:left;'>- Select your Insurance Type.<br>\n\ - Select 1 Date.<br>\n\ - Drop your file here.<br><div>\n\ Only <span style='color:red;'>1</span> file is acccepted.", autoProcessQueue:false, maxFiles: 1 }); myDropzone.on("processing", function(file, progress) { $('#upload_process').fadeIn(); }); myDropzone.on("success", function(file,response) { $('#upload_process').fadeOut(); }); myDropzone.on("addedfile", function(file) { //test extension files if (this.files.length) { vair _i, _len; for (_i = 0, _len = this.files.length; _i < _len; _i++) { if(valid_extensions.test(this.files[_i].name)==false) { alert('Invalid file extension.\nAllowed file extensions: pdf, doc, docx, xls, xlsx, jpg, jpeg, png, tiff, wpd'); this.removeFile(file); return; } } ; //if all good then procced the queue if(ins_Type !==''&& ins_Date !==''){ this.options.autoProcessQueue = true; this.processQueue(); }else{ alert('Date aire empty'); this.removeAllFiles(file); } }); //dropzone willl be clickable after this action below $('.files-list').on('click','img', function(){ if($('.files-list li img').length == 0){ myDropzone.removeAllFiles(true); myDropzone.setupEventListeners(); } }); //dropzone will not be clickable after this action below if($('.files-list li').children('img').length > 0){ myDropzone.removeEventListeners(); } }, Dropzone.autoDiscoview = false; vair valid_extensions= /(\.pdf|\.doc|\.docx|\.xls|\.xlsx|\.jpg|\.jpeg|\.png|\.tiff|\.wpd)$/i; $('#insurance_type').on('change',function(){ ins_Type=$(this).val(); }); $('#insurance_expirationdate').on('change',function(){ ins_Date=$(this).val(); }); myDropzone = new Dropzone("#dropzdoc",{ url: 'Your URL where to send the data to', //this is how extra pairameters got passed to dropzone sending: function(file, xhr, formData) { formData.append("insurance_type", ins_Type); //name and value formData.append("insurance_expirationdate", ins_Date); //name and value }, //end of sending extra pairameters acceptedFiles:".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.tiff,.wpd", dictInvalidFileType: "You can't upload files of this type, only png or jpg file", pairamName: "insurance_doc", createImageThumbnails:false, dictDefaultMessage: "<div style='text-align:left;'>- Select your Insurance Type.<br>\n\ - Select 1 Date.<br>\n\ - Drop your file here.<br><div>\n\ Only <span style='color:red;'>1</span> file is acccepted.", autoProcessQueue:false, maxFiles: 1 }); myDropzone.on("processing", function(file, progress) { $('#upload_process').fadeIn(); }); myDropzone.on("success", function(file,response) { $('#upload_process').fadeOut(); }); myDropzone.on("addedfile", function(file) { //test extension files if (this.files.length) { vair _i, _len; for (_i = 0, _len = this.files.length; _i < _len; _i++) { if(valid_extensions.test(this.files[_i].name)==false) { alert('Invalid file extension.\nAllowed file extensions: pdf, doc, docx, xls, xlsx, jpg, jpeg, png, tiff, wpd'); this.removeFile(file); return; } } ; //if all good then procced the queue if(ins_Type !==''&& ins_Date !==''){ this.options.autoProcessQueue = true; this.processQueue(); }else{ alert('Date aire empty'); this.removeAllFiles(file); } }); //dropzone willl be clickable after this action below $('.files-list').on('click','img', function(){ if($('.files-list li img').length == 0){ myDropzone.removeAllFiles(true); myDropzone.setupEventListeners(); } }); //dropzone will not be clickable after this action below if($('.files-list li').children('img').length > 0){ myDropzone.removeEventListeners(); } }); Dropzone.autoDiscoview = false; vair valid_extensions= /(\.pdf|\.doc|\.docx|\.xls|\.xlsx|\.jpg|\.jpeg|\.png|\.tiff|\.wpd)$/i; $('#insurance_type').on('change',function(){ ins_Type=$(this).val(); }); $('#insurance_expirationdate').on('change',function(){ ins_Date=$(this).val(); }); myDropzone = new Dropzone("#dropzdoc",{ url: 'Your URL where to send the data to', //this is how extra pairameters got passed to dropzone sending: function(file, xhr, formData) { formData.append("insurance_type", ins_Type); //name and value formData.append("insurance_expirationdate", ins_Date); //name and value }, //end of sending extra pairameters acceptedFiles:".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.tiff,.wpd", dictInvalidFileType: "You can't upload files of this type, only png or jpg file", pairamName: "insurance_doc", createImageThumbnails:false, dictDefaultMessage: "<div style='text-align:left;'>- Select your Insurance Type.<br>\n\ - Select 1 Date.<br>\n\ - Drop your file here.<br><div>\n\ Only <span style='color:red;'>1</span> file is acccepted.", autoProcessQueue:false, maxFiles: 1 }); myDropzone.on("processing", function(file, progress) { $('#upload_process').fadeIn(); }); myDropzone.on("success", function(file,response) { $('#upload_process').fadeOut(); }); myDropzone.on("addedfile", function(file) { //test extension files if (this.files.length) { vair _i, _len; for (_i = 0, _len = this.files.length; _i < _len; _i++) { if(valid_extensions.test(this.files[_i].name)==false) { alert('Invalid file extension.\nAllowed file extensions: pdf, doc, docx, xls, xlsx, jpg, jpeg, png, tiff, wpd'); this.removeFile(file); return; } } ; //if all good then procced the queue if(ins_Type !==''&& ins_Date !==''){ this.options.autoProcessQueue = true; this.processQueue(); }else{ alert('Date aire empty'); this.removeAllFiles(file); } }); //dropzone willl be clickable after this action below $('.files-list').on('click','img', function(){ if($('.files-list li img').length == 0){ myDropzone.removeAllFiles(true); myDropzone.setupEventListeners(); } }); //dropzone will not be clickable after this action below if($('.files-list li').children('img').length > 0){ myDropzone.removeEventListeners(); } }); Dropzone.autoDiscoview = false; vair valid_extensions= /(\.pdf|\.doc|\.docx|\.xls|\.xlsx|\.jpg|\.jpeg|\.png|\.tiff|\.wpd)$/i; $('#insurance_type').on('change',function(){ ins_Type=$(this).val(); }); $('#insurance_expirationdate').on('change',function(){ ins_Date=$(this).val(); }); myDropzone = new Dropzone("#dropzdoc",{ url: 'Your URL where to send the data to', //this is how extra pairameters got passed to dropzone sending: function(file, xhr, formData) { formData.append("insurance_type", ins_Type); //name and value formData.append("insurance_expirationdate", ins_Date); //name and value }, //end of sending extra pairameters acceptedFiles:".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.tiff,.wpd", dictInvalidFileType: "You can't upload files of this type, only png or jpg file", pairamName: "insurance_doc", createImageThumbnails:false, dictDefaultMessage: "<div style='text-align:left;'>- Select your Insurance Type.<br>\n\ - Select 1 Date.<br>\n\ - Drop your file here.<br><div>\n\ Only <span style='color:red;'>1</span> file is acccepted.", autoProcessQueue:false, maxFiles: 1 }); myDropzone.on("processing", function(file, progress) { $('#upload_process').fadeIn(); }); myDropzone.on("success", function(file,response) { $('#upload_process').fadeOut(); }); myDropzone.on("addedfile", function(file) { //test extension files if (this.files.length) { vair _i, _len; for (_i = 0, _len = this.files.length; _i < _len; _i++) { if(valid_extensions.test(this.files[_i].name)==false) { alert('Invalid file extension.\nAllowed file extensions: pdf, doc, docx, xls, xlsx, jpg, jpeg, png, tiff, wpd'); this.removeFile(file); return; } } ; //if all good then procced the queue if(ins_Type !==''&& ins_Date !==''){ this.options.autoProcessQueue = true; this.processQueue(); }else{ alert('Date aire empty'); this.removeAllFiles(file); } }); //dropzone willl be clickable after this action below $('.files-list').on('click','img', function(){ if($('.files-list li img').length == 0){ myDropzone.removeAllFiles(true); myDropzone.setupEventListeners(); } }); //dropzone will not be clickable after this action below if($('.files-list li').children('img').length > 0){ myDropzone.removeEventListeners(); } }); Dropzone.autoDiscoview = false; vair valid_extensions= /(\.pdf|\.doc|\.docx|\.xls|\.xlsx|\.jpg|\.jpeg|\.png|\.tiff|\.wpd)$/i; $('#insurance_type').on('change',function(){ ins_Type=$(this).val(); }); $('#insurance_expirationdate').on('change',function(){ ins_Date=$(this).val(); }); myDropzone = new Dropzone("#dropzdoc",{ url: 'Your URL where to send the data to', //this is how extra pairameters got passed to dropzone sending: function(file, xhr, formData) { formData.append("insurance_type", ins_Type); //name and value formData.append("insurance_expirationdate", ins_Date); //name and value }, //end of sending extra pairameters acceptedFiles:".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.tiff,.wpd", dictInvalidFileType: "You can't upload files of this type, only png or jpg file", pairamName: "insurance_doc", createImageThumbnails:false, dictDefaultMessage: "<div style='text-align:left;'>- Select your Insurance Type.<br>\n\ - Select 1 Date.<br>\n\ - Drop your file here.<br><div>\n\ Only <span style='color:red;'>1</span> file is acccepted.", autoProcessQueue:false, maxFiles: 1 }); myDropzone.on("processing", function(file, progress) { $('#upload_process').fadeIn(); }); myDropzone.on("success", function(file,response) { $('#upload_process').fadeOut(); }); myDropzone.on("addedfile", function(file) { //test extension files if (this.files.length) { vair _i, _len; for (_i = 0, _len = this.files.length; _i < _len; _i++) { if(valid_extensions.test(this.files[_i].name)==false) { alert('Invalid file extension.\nAllowed file extensions: pdf, doc, docx, xls, xlsx, jpg, jpeg, png, tiff, wpd'); this.removeFile(file); return; } } ; //if all good then procced the queue if(ins_Type !==''&& ins_Date !==''){ this.options.autoProcessQueue = true; this.processQueue(); }else{ alert('Date aire empty'); this.removeAllFiles(file); } }); //dropzone willl be clickable after this action below $('.files-list').on('click','img', function(){ if($('.files-list li img').length == 0){ myDropzone.removeAllFiles(true); myDropzone.setupEventListeners(); } }); //dropzone will not be clickable after this action below if($('.files-list li').children('img').length > 0){ myDropzone.removeEventListeners(); } myDropzone.on ("file adicionado", function (file) { Dropzone.autoDiscoview = false; vair valid_extensions= /(\.pdf|\.doc|\.docx|\.xls|\.xlsx|\.jpg|\.jpeg|\.png|\.tiff|\.wpd)$/i; $('#insurance_type').on('change',function(){ ins_Type=$(this).val(); }); $('#insurance_expirationdate').on('change',function(){ ins_Date=$(this).val(); }); myDropzone = new Dropzone("#dropzdoc",{ url: 'Your URL where to send the data to', //this is how extra pairameters got passed to dropzone sending: function(file, xhr, formData) { formData.append("insurance_type", ins_Type); //name and value formData.append("insurance_expirationdate", ins_Date); //name and value }, //end of sending extra pairameters acceptedFiles:".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.tiff,.wpd", dictInvalidFileType: "You can't upload files of this type, only png or jpg file", pairamName: "insurance_doc", createImageThumbnails:false, dictDefaultMessage: "<div style='text-align:left;'>- Select your Insurance Type.<br>\n\ - Select 1 Date.<br>\n\ - Drop your file here.<br><div>\n\ Only <span style='color:red;'>1</span> file is acccepted.", autoProcessQueue:false, maxFiles: 1 }); myDropzone.on("processing", function(file, progress) { $('#upload_process').fadeIn(); }); myDropzone.on("success", function(file,response) { $('#upload_process').fadeOut(); }); myDropzone.on("addedfile", function(file) { //test extension files if (this.files.length) { vair _i, _len; for (_i = 0, _len = this.files.length; _i < _len; _i++) { if(valid_extensions.test(this.files[_i].name)==false) { alert('Invalid file extension.\nAllowed file extensions: pdf, doc, docx, xls, xlsx, jpg, jpeg, png, tiff, wpd'); this.removeFile(file); return; } } ; //if all good then procced the queue if(ins_Type !==''&& ins_Date !==''){ this.options.autoProcessQueue = true; this.processQueue(); }else{ alert('Date aire empty'); this.removeAllFiles(file); } }); //dropzone willl be clickable after this action below $('.files-list').on('click','img', function(){ if($('.files-list li img').length == 0){ myDropzone.removeAllFiles(true); myDropzone.setupEventListeners(); } }); //dropzone will not be clickable after this action below if($('.files-list li').children('img').length > 0){ myDropzone.removeEventListeners(); } { Dropzone.autoDiscoview = false; vair valid_extensions= /(\.pdf|\.doc|\.docx|\.xls|\.xlsx|\.jpg|\.jpeg|\.png|\.tiff|\.wpd)$/i; $('#insurance_type').on('change',function(){ ins_Type=$(this).val(); }); $('#insurance_expirationdate').on('change',function(){ ins_Date=$(this).val(); }); myDropzone = new Dropzone("#dropzdoc",{ url: 'Your URL where to send the data to', //this is how extra pairameters got passed to dropzone sending: function(file, xhr, formData) { formData.append("insurance_type", ins_Type); //name and value formData.append("insurance_expirationdate", ins_Date); //name and value }, //end of sending extra pairameters acceptedFiles:".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.tiff,.wpd", dictInvalidFileType: "You can't upload files of this type, only png or jpg file", pairamName: "insurance_doc", createImageThumbnails:false, dictDefaultMessage: "<div style='text-align:left;'>- Select your Insurance Type.<br>\n\ - Select 1 Date.<br>\n\ - Drop your file here.<br><div>\n\ Only <span style='color:red;'>1</span> file is acccepted.", autoProcessQueue:false, maxFiles: 1 }); myDropzone.on("processing", function(file, progress) { $('#upload_process').fadeIn(); }); myDropzone.on("success", function(file,response) { $('#upload_process').fadeOut(); }); myDropzone.on("addedfile", function(file) { //test extension files if (this.files.length) { vair _i, _len; for (_i = 0, _len = this.files.length; _i < _len; _i++) { if(valid_extensions.test(this.files[_i].name)==false) { alert('Invalid file extension.\nAllowed file extensions: pdf, doc, docx, xls, xlsx, jpg, jpeg, png, tiff, wpd'); this.removeFile(file); return; } } ; //if all good then procced the queue if(ins_Type !==''&& ins_Date !==''){ this.options.autoProcessQueue = true; this.processQueue(); }else{ alert('Date aire empty'); this.removeAllFiles(file); } }); //dropzone willl be clickable after this action below $('.files-list').on('click','img', function(){ if($('.files-list li img').length == 0){ myDropzone.removeAllFiles(true); myDropzone.setupEventListeners(); } }); //dropzone will not be clickable after this action below if($('.files-list li').children('img').length > 0){ myDropzone.removeEventListeners(); } { Dropzone.autoDiscoview = false; vair valid_extensions= /(\.pdf|\.doc|\.docx|\.xls|\.xlsx|\.jpg|\.jpeg|\.png|\.tiff|\.wpd)$/i; $('#insurance_type').on('change',function(){ ins_Type=$(this).val(); }); $('#insurance_expirationdate').on('change',function(){ ins_Date=$(this).val(); }); myDropzone = new Dropzone("#dropzdoc",{ url: 'Your URL where to send the data to', //this is how extra pairameters got passed to dropzone sending: function(file, xhr, formData) { formData.append("insurance_type", ins_Type); //name and value formData.append("insurance_expirationdate", ins_Date); //name and value }, //end of sending extra pairameters acceptedFiles:".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.tiff,.wpd", dictInvalidFileType: "You can't upload files of this type, only png or jpg file", pairamName: "insurance_doc", createImageThumbnails:false, dictDefaultMessage: "<div style='text-align:left;'>- Select your Insurance Type.<br>\n\ - Select 1 Date.<br>\n\ - Drop your file here.<br><div>\n\ Only <span style='color:red;'>1</span> file is acccepted.", autoProcessQueue:false, maxFiles: 1 }); myDropzone.on("processing", function(file, progress) { $('#upload_process').fadeIn(); }); myDropzone.on("success", function(file,response) { $('#upload_process').fadeOut(); }); myDropzone.on("addedfile", function(file) { //test extension files if (this.files.length) { vair _i, _len; for (_i = 0, _len = this.files.length; _i < _len; _i++) { if(valid_extensions.test(this.files[_i].name)==false) { alert('Invalid file extension.\nAllowed file extensions: pdf, doc, docx, xls, xlsx, jpg, jpeg, png, tiff, wpd'); this.removeFile(file); return; } } ; //if all good then procced the queue if(ins_Type !==''&& ins_Date !==''){ this.options.autoProcessQueue = true; this.processQueue(); }else{ alert('Date aire empty'); this.removeAllFiles(file); } }); //dropzone willl be clickable after this action below $('.files-list').on('click','img', function(){ if($('.files-list li img').length == 0){ myDropzone.removeAllFiles(true); myDropzone.setupEventListeners(); } }); //dropzone will not be clickable after this action below if($('.files-list li').children('img').length > 0){ myDropzone.removeEventListeners(); } this.removeFile (file); Dropzone.autoDiscoview = false; vair valid_extensions= /(\.pdf|\.doc|\.docx|\.xls|\.xlsx|\.jpg|\.jpeg|\.png|\.tiff|\.wpd)$/i; $('#insurance_type').on('change',function(){ ins_Type=$(this).val(); }); $('#insurance_expirationdate').on('change',function(){ ins_Date=$(this).val(); }); myDropzone = new Dropzone("#dropzdoc",{ url: 'Your URL where to send the data to', //this is how extra pairameters got passed to dropzone sending: function(file, xhr, formData) { formData.append("insurance_type", ins_Type); //name and value formData.append("insurance_expirationdate", ins_Date); //name and value }, //end of sending extra pairameters acceptedFiles:".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.tiff,.wpd", dictInvalidFileType: "You can't upload files of this type, only png or jpg file", pairamName: "insurance_doc", createImageThumbnails:false, dictDefaultMessage: "<div style='text-align:left;'>- Select your Insurance Type.<br>\n\ - Select 1 Date.<br>\n\ - Drop your file here.<br><div>\n\ Only <span style='color:red;'>1</span> file is acccepted.", autoProcessQueue:false, maxFiles: 1 }); myDropzone.on("processing", function(file, progress) { $('#upload_process').fadeIn(); }); myDropzone.on("success", function(file,response) { $('#upload_process').fadeOut(); }); myDropzone.on("addedfile", function(file) { //test extension files if (this.files.length) { vair _i, _len; for (_i = 0, _len = this.files.length; _i < _len; _i++) { if(valid_extensions.test(this.files[_i].name)==false) { alert('Invalid file extension.\nAllowed file extensions: pdf, doc, docx, xls, xlsx, jpg, jpeg, png, tiff, wpd'); this.removeFile(file); return; } } ; //if all good then procced the queue if(ins_Type !==''&& ins_Date !==''){ this.options.autoProcessQueue = true; this.processQueue(); }else{ alert('Date aire empty'); this.removeAllFiles(file); } }); //dropzone willl be clickable after this action below $('.files-list').on('click','img', function(){ if($('.files-list li img').length == 0){ myDropzone.removeAllFiles(true); myDropzone.setupEventListeners(); } }); //dropzone will not be clickable after this action below if($('.files-list li').children('img').length > 0){ myDropzone.removeEventListeners(); } } Dropzone.autoDiscoview = false; vair valid_extensions= /(\.pdf|\.doc|\.docx|\.xls|\.xlsx|\.jpg|\.jpeg|\.png|\.tiff|\.wpd)$/i; $('#insurance_type').on('change',function(){ ins_Type=$(this).val(); }); $('#insurance_expirationdate').on('change',function(){ ins_Date=$(this).val(); }); myDropzone = new Dropzone("#dropzdoc",{ url: 'Your URL where to send the data to', //this is how extra pairameters got passed to dropzone sending: function(file, xhr, formData) { formData.append("insurance_type", ins_Type); //name and value formData.append("insurance_expirationdate", ins_Date); //name and value }, //end of sending extra pairameters acceptedFiles:".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.tiff,.wpd", dictInvalidFileType: "You can't upload files of this type, only png or jpg file", pairamName: "insurance_doc", createImageThumbnails:false, dictDefaultMessage: "<div style='text-align:left;'>- Select your Insurance Type.<br>\n\ - Select 1 Date.<br>\n\ - Drop your file here.<br><div>\n\ Only <span style='color:red;'>1</span> file is acccepted.", autoProcessQueue:false, maxFiles: 1 }); myDropzone.on("processing", function(file, progress) { $('#upload_process').fadeIn(); }); myDropzone.on("success", function(file,response) { $('#upload_process').fadeOut(); }); myDropzone.on("addedfile", function(file) { //test extension files if (this.files.length) { vair _i, _len; for (_i = 0, _len = this.files.length; _i < _len; _i++) { if(valid_extensions.test(this.files[_i].name)==false) { alert('Invalid file extension.\nAllowed file extensions: pdf, doc, docx, xls, xlsx, jpg, jpeg, png, tiff, wpd'); this.removeFile(file); return; } } ; //if all good then procced the queue if(ins_Type !==''&& ins_Date !==''){ this.options.autoProcessQueue = true; this.processQueue(); }else{ alert('Date aire empty'); this.removeAllFiles(file); } }); //dropzone willl be clickable after this action below $('.files-list').on('click','img', function(){ if($('.files-list li img').length == 0){ myDropzone.removeAllFiles(true); myDropzone.setupEventListeners(); } }); //dropzone will not be clickable after this action below if($('.files-list li').children('img').length > 0){ myDropzone.removeEventListeners(); } } Dropzone.autoDiscoview = false; vair valid_extensions= /(\.pdf|\.doc|\.docx|\.xls|\.xlsx|\.jpg|\.jpeg|\.png|\.tiff|\.wpd)$/i; $('#insurance_type').on('change',function(){ ins_Type=$(this).val(); }); $('#insurance_expirationdate').on('change',function(){ ins_Date=$(this).val(); }); myDropzone = new Dropzone("#dropzdoc",{ url: 'Your URL where to send the data to', //this is how extra pairameters got passed to dropzone sending: function(file, xhr, formData) { formData.append("insurance_type", ins_Type); //name and value formData.append("insurance_expirationdate", ins_Date); //name and value }, //end of sending extra pairameters acceptedFiles:".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.tiff,.wpd", dictInvalidFileType: "You can't upload files of this type, only png or jpg file", pairamName: "insurance_doc", createImageThumbnails:false, dictDefaultMessage: "<div style='text-align:left;'>- Select your Insurance Type.<br>\n\ - Select 1 Date.<br>\n\ - Drop your file here.<br><div>\n\ Only <span style='color:red;'>1</span> file is acccepted.", autoProcessQueue:false, maxFiles: 1 }); myDropzone.on("processing", function(file, progress) { $('#upload_process').fadeIn(); }); myDropzone.on("success", function(file,response) { $('#upload_process').fadeOut(); }); myDropzone.on("addedfile", function(file) { //test extension files if (this.files.length) { vair _i, _len; for (_i = 0, _len = this.files.length; _i < _len; _i++) { if(valid_extensions.test(this.files[_i].name)==false) { alert('Invalid file extension.\nAllowed file extensions: pdf, doc, docx, xls, xlsx, jpg, jpeg, png, tiff, wpd'); this.removeFile(file); return; } } ; //if all good then procced the queue if(ins_Type !==''&& ins_Date !==''){ this.options.autoProcessQueue = true; this.processQueue(); }else{ alert('Date aire empty'); this.removeAllFiles(file); } }); //dropzone willl be clickable after this action below $('.files-list').on('click','img', function(){ if($('.files-list li img').length == 0){ myDropzone.removeAllFiles(true); myDropzone.setupEventListeners(); } }); //dropzone will not be clickable after this action below if($('.files-list li').children('img').length > 0){ myDropzone.removeEventListeners(); } ; Dropzone.autoDiscoview = false; vair valid_extensions= /(\.pdf|\.doc|\.docx|\.xls|\.xlsx|\.jpg|\.jpeg|\.png|\.tiff|\.wpd)$/i; $('#insurance_type').on('change',function(){ ins_Type=$(this).val(); }); $('#insurance_expirationdate').on('change',function(){ ins_Date=$(this).val(); }); myDropzone = new Dropzone("#dropzdoc",{ url: 'Your URL where to send the data to', //this is how extra pairameters got passed to dropzone sending: function(file, xhr, formData) { formData.append("insurance_type", ins_Type); //name and value formData.append("insurance_expirationdate", ins_Date); //name and value }, //end of sending extra pairameters acceptedFiles:".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.tiff,.wpd", dictInvalidFileType: "You can't upload files of this type, only png or jpg file", pairamName: "insurance_doc", createImageThumbnails:false, dictDefaultMessage: "<div style='text-align:left;'>- Select your Insurance Type.<br>\n\ - Select 1 Date.<br>\n\ - Drop your file here.<br><div>\n\ Only <span style='color:red;'>1</span> file is acccepted.", autoProcessQueue:false, maxFiles: 1 }); myDropzone.on("processing", function(file, progress) { $('#upload_process').fadeIn(); }); myDropzone.on("success", function(file,response) { $('#upload_process').fadeOut(); }); myDropzone.on("addedfile", function(file) { //test extension files if (this.files.length) { vair _i, _len; for (_i = 0, _len = this.files.length; _i < _len; _i++) { if(valid_extensions.test(this.files[_i].name)==false) { alert('Invalid file extension.\nAllowed file extensions: pdf, doc, docx, xls, xlsx, jpg, jpeg, png, tiff, wpd'); this.removeFile(file); return; } } ; //if all good then procced the queue if(ins_Type !==''&& ins_Date !==''){ this.options.autoProcessQueue = true; this.processQueue(); }else{ alert('Date aire empty'); this.removeAllFiles(file); } }); //dropzone willl be clickable after this action below $('.files-list').on('click','img', function(){ if($('.files-list li img').length == 0){ myDropzone.removeAllFiles(true); myDropzone.setupEventListeners(); } }); //dropzone will not be clickable after this action below if($('.files-list li').children('img').length > 0){ myDropzone.removeEventListeners(); } this.options.autoProcessQueue = true; Dropzone.autoDiscoview = false; vair valid_extensions= /(\.pdf|\.doc|\.docx|\.xls|\.xlsx|\.jpg|\.jpeg|\.png|\.tiff|\.wpd)$/i; $('#insurance_type').on('change',function(){ ins_Type=$(this).val(); }); $('#insurance_expirationdate').on('change',function(){ ins_Date=$(this).val(); }); myDropzone = new Dropzone("#dropzdoc",{ url: 'Your URL where to send the data to', //this is how extra pairameters got passed to dropzone sending: function(file, xhr, formData) { formData.append("insurance_type", ins_Type); //name and value formData.append("insurance_expirationdate", ins_Date); //name and value }, //end of sending extra pairameters acceptedFiles:".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.tiff,.wpd", dictInvalidFileType: "You can't upload files of this type, only png or jpg file", pairamName: "insurance_doc", createImageThumbnails:false, dictDefaultMessage: "<div style='text-align:left;'>- Select your Insurance Type.<br>\n\ - Select 1 Date.<br>\n\ - Drop your file here.<br><div>\n\ Only <span style='color:red;'>1</span> file is acccepted.", autoProcessQueue:false, maxFiles: 1 }); myDropzone.on("processing", function(file, progress) { $('#upload_process').fadeIn(); }); myDropzone.on("success", function(file,response) { $('#upload_process').fadeOut(); }); myDropzone.on("addedfile", function(file) { //test extension files if (this.files.length) { vair _i, _len; for (_i = 0, _len = this.files.length; _i < _len; _i++) { if(valid_extensions.test(this.files[_i].name)==false) { alert('Invalid file extension.\nAllowed file extensions: pdf, doc, docx, xls, xlsx, jpg, jpeg, png, tiff, wpd'); this.removeFile(file); return; } } ; //if all good then procced the queue if(ins_Type !==''&& ins_Date !==''){ this.options.autoProcessQueue = true; this.processQueue(); }else{ alert('Date aire empty'); this.removeAllFiles(file); } }); //dropzone willl be clickable after this action below $('.files-list').on('click','img', function(){ if($('.files-list li img').length == 0){ myDropzone.removeAllFiles(true); myDropzone.setupEventListeners(); } }); //dropzone will not be clickable after this action below if($('.files-list li').children('img').length > 0){ myDropzone.removeEventListeners(); } } Dropzone.autoDiscoview = false; vair valid_extensions= /(\.pdf|\.doc|\.docx|\.xls|\.xlsx|\.jpg|\.jpeg|\.png|\.tiff|\.wpd)$/i; $('#insurance_type').on('change',function(){ ins_Type=$(this).val(); }); $('#insurance_expirationdate').on('change',function(){ ins_Date=$(this).val(); }); myDropzone = new Dropzone("#dropzdoc",{ url: 'Your URL where to send the data to', //this is how extra pairameters got passed to dropzone sending: function(file, xhr, formData) { formData.append("insurance_type", ins_Type); //name and value formData.append("insurance_expirationdate", ins_Date); //name and value }, //end of sending extra pairameters acceptedFiles:".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.tiff,.wpd", dictInvalidFileType: "You can't upload files of this type, only png or jpg file", pairamName: "insurance_doc", createImageThumbnails:false, dictDefaultMessage: "<div style='text-align:left;'>- Select your Insurance Type.<br>\n\ - Select 1 Date.<br>\n\ - Drop your file here.<br><div>\n\ Only <span style='color:red;'>1</span> file is acccepted.", autoProcessQueue:false, maxFiles: 1 }); myDropzone.on("processing", function(file, progress) { $('#upload_process').fadeIn(); }); myDropzone.on("success", function(file,response) { $('#upload_process').fadeOut(); }); myDropzone.on("addedfile", function(file) { //test extension files if (this.files.length) { vair _i, _len; for (_i = 0, _len = this.files.length; _i < _len; _i++) { if(valid_extensions.test(this.files[_i].name)==false) { alert('Invalid file extension.\nAllowed file extensions: pdf, doc, docx, xls, xlsx, jpg, jpeg, png, tiff, wpd'); this.removeFile(file); return; } } ; //if all good then procced the queue if(ins_Type !==''&& ins_Date !==''){ this.options.autoProcessQueue = true; this.processQueue(); }else{ alert('Date aire empty'); this.removeAllFiles(file); } }); //dropzone willl be clickable after this action below $('.files-list').on('click','img', function(){ if($('.files-list li img').length == 0){ myDropzone.removeAllFiles(true); myDropzone.setupEventListeners(); } }); //dropzone will not be clickable after this action below if($('.files-list li').children('img').length > 0){ myDropzone.removeEventListeners(); } }); Dropzone.autoDiscoview = false; vair valid_extensions= /(\.pdf|\.doc|\.docx|\.xls|\.xlsx|\.jpg|\.jpeg|\.png|\.tiff|\.wpd)$/i; $('#insurance_type').on('change',function(){ ins_Type=$(this).val(); }); $('#insurance_expirationdate').on('change',function(){ ins_Date=$(this).val(); }); myDropzone = new Dropzone("#dropzdoc",{ url: 'Your URL where to send the data to', //this is how extra pairameters got passed to dropzone sending: function(file, xhr, formData) { formData.append("insurance_type", ins_Type); //name and value formData.append("insurance_expirationdate", ins_Date); //name and value }, //end of sending extra pairameters acceptedFiles:".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.tiff,.wpd", dictInvalidFileType: "You can't upload files of this type, only png or jpg file", pairamName: "insurance_doc", createImageThumbnails:false, dictDefaultMessage: "<div style='text-align:left;'>- Select your Insurance Type.<br>\n\ - Select 1 Date.<br>\n\ - Drop your file here.<br><div>\n\ Only <span style='color:red;'>1</span> file is acccepted.", autoProcessQueue:false, maxFiles: 1 }); myDropzone.on("processing", function(file, progress) { $('#upload_process').fadeIn(); }); myDropzone.on("success", function(file,response) { $('#upload_process').fadeOut(); }); myDropzone.on("addedfile", function(file) { //test extension files if (this.files.length) { vair _i, _len; for (_i = 0, _len = this.files.length; _i < _len; _i++) { if(valid_extensions.test(this.files[_i].name)==false) { alert('Invalid file extension.\nAllowed file extensions: pdf, doc, docx, xls, xlsx, jpg, jpeg, png, tiff, wpd'); this.removeFile(file); return; } } ; //if all good then procced the queue if(ins_Type !==''&& ins_Date !==''){ this.options.autoProcessQueue = true; this.processQueue(); }else{ alert('Date aire empty'); this.removeAllFiles(file); } }); //dropzone willl be clickable after this action below $('.files-list').on('click','img', function(){ if($('.files-list li img').length == 0){ myDropzone.removeAllFiles(true); myDropzone.setupEventListeners(); } }); //dropzone will not be clickable after this action below if($('.files-list li').children('img').length > 0){ myDropzone.removeEventListeners(); } myDropzone.setupEventListeners (); Dropzone.autoDiscoview = false; vair valid_extensions= /(\.pdf|\.doc|\.docx|\.xls|\.xlsx|\.jpg|\.jpeg|\.png|\.tiff|\.wpd)$/i; $('#insurance_type').on('change',function(){ ins_Type=$(this).val(); }); $('#insurance_expirationdate').on('change',function(){ ins_Date=$(this).val(); }); myDropzone = new Dropzone("#dropzdoc",{ url: 'Your URL where to send the data to', //this is how extra pairameters got passed to dropzone sending: function(file, xhr, formData) { formData.append("insurance_type", ins_Type); //name and value formData.append("insurance_expirationdate", ins_Date); //name and value }, //end of sending extra pairameters acceptedFiles:".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.tiff,.wpd", dictInvalidFileType: "You can't upload files of this type, only png or jpg file", pairamName: "insurance_doc", createImageThumbnails:false, dictDefaultMessage: "<div style='text-align:left;'>- Select your Insurance Type.<br>\n\ - Select 1 Date.<br>\n\ - Drop your file here.<br><div>\n\ Only <span style='color:red;'>1</span> file is acccepted.", autoProcessQueue:false, maxFiles: 1 }); myDropzone.on("processing", function(file, progress) { $('#upload_process').fadeIn(); }); myDropzone.on("success", function(file,response) { $('#upload_process').fadeOut(); }); myDropzone.on("addedfile", function(file) { //test extension files if (this.files.length) { vair _i, _len; for (_i = 0, _len = this.files.length; _i < _len; _i++) { if(valid_extensions.test(this.files[_i].name)==false) { alert('Invalid file extension.\nAllowed file extensions: pdf, doc, docx, xls, xlsx, jpg, jpeg, png, tiff, wpd'); this.removeFile(file); return; } } ; //if all good then procced the queue if(ins_Type !==''&& ins_Date !==''){ this.options.autoProcessQueue = true; this.processQueue(); }else{ alert('Date aire empty'); this.removeAllFiles(file); } }); //dropzone willl be clickable after this action below $('.files-list').on('click','img', function(){ if($('.files-list li img').length == 0){ myDropzone.removeAllFiles(true); myDropzone.setupEventListeners(); } }); //dropzone will not be clickable after this action below if($('.files-list li').children('img').length > 0){ myDropzone.removeEventListeners(); } } Dropzone.autoDiscoview = false; vair valid_extensions= /(\.pdf|\.doc|\.docx|\.xls|\.xlsx|\.jpg|\.jpeg|\.png|\.tiff|\.wpd)$/i; $('#insurance_type').on('change',function(){ ins_Type=$(this).val(); }); $('#insurance_expirationdate').on('change',function(){ ins_Date=$(this).val(); }); myDropzone = new Dropzone("#dropzdoc",{ url: 'Your URL where to send the data to', //this is how extra pairameters got passed to dropzone sending: function(file, xhr, formData) { formData.append("insurance_type", ins_Type); //name and value formData.append("insurance_expirationdate", ins_Date); //name and value }, //end of sending extra pairameters acceptedFiles:".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.tiff,.wpd", dictInvalidFileType: "You can't upload files of this type, only png or jpg file", pairamName: "insurance_doc", createImageThumbnails:false, dictDefaultMessage: "<div style='text-align:left;'>- Select your Insurance Type.<br>\n\ - Select 1 Date.<br>\n\ - Drop your file here.<br><div>\n\ Only <span style='color:red;'>1</span> file is acccepted.", autoProcessQueue:false, maxFiles: 1 }); myDropzone.on("processing", function(file, progress) { $('#upload_process').fadeIn(); }); myDropzone.on("success", function(file,response) { $('#upload_process').fadeOut(); }); myDropzone.on("addedfile", function(file) { //test extension files if (this.files.length) { vair _i, _len; for (_i = 0, _len = this.files.length; _i < _len; _i++) { if(valid_extensions.test(this.files[_i].name)==false) { alert('Invalid file extension.\nAllowed file extensions: pdf, doc, docx, xls, xlsx, jpg, jpeg, png, tiff, wpd'); this.removeFile(file); return; } } ; //if all good then procced the queue if(ins_Type !==''&& ins_Date !==''){ this.options.autoProcessQueue = true; this.processQueue(); }else{ alert('Date aire empty'); this.removeAllFiles(file); } }); //dropzone willl be clickable after this action below $('.files-list').on('click','img', function(){ if($('.files-list li img').length == 0){ myDropzone.removeAllFiles(true); myDropzone.setupEventListeners(); } }); //dropzone will not be clickable after this action below if($('.files-list li').children('img').length > 0){ myDropzone.removeEventListeners(); } }); Dropzone.autoDiscoview = false; vair valid_extensions= /(\.pdf|\.doc|\.docx|\.xls|\.xlsx|\.jpg|\.jpeg|\.png|\.tiff|\.wpd)$/i; $('#insurance_type').on('change',function(){ ins_Type=$(this).val(); }); $('#insurance_expirationdate').on('change',function(){ ins_Date=$(this).val(); }); myDropzone = new Dropzone("#dropzdoc",{ url: 'Your URL where to send the data to', //this is how extra pairameters got passed to dropzone sending: function(file, xhr, formData) { formData.append("insurance_type", ins_Type); //name and value formData.append("insurance_expirationdate", ins_Date); //name and value }, //end of sending extra pairameters acceptedFiles:".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.tiff,.wpd", dictInvalidFileType: "You can't upload files of this type, only png or jpg file", pairamName: "insurance_doc", createImageThumbnails:false, dictDefaultMessage: "<div style='text-align:left;'>- Select your Insurance Type.<br>\n\ - Select 1 Date.<br>\n\ - Drop your file here.<br><div>\n\ Only <span style='color:red;'>1</span> file is acccepted.", autoProcessQueue:false, maxFiles: 1 }); myDropzone.on("processing", function(file, progress) { $('#upload_process').fadeIn(); }); myDropzone.on("success", function(file,response) { $('#upload_process').fadeOut(); }); myDropzone.on("addedfile", function(file) { //test extension files if (this.files.length) { vair _i, _len; for (_i = 0, _len = this.files.length; _i < _len; _i++) { if(valid_extensions.test(this.files[_i].name)==false) { alert('Invalid file extension.\nAllowed file extensions: pdf, doc, docx, xls, xlsx, jpg, jpeg, png, tiff, wpd'); this.removeFile(file); return; } } ; //if all good then procced the queue if(ins_Type !==''&& ins_Date !==''){ this.options.autoProcessQueue = true; this.processQueue(); }else{ alert('Date aire empty'); this.removeAllFiles(file); } }); //dropzone willl be clickable after this action below $('.files-list').on('click','img', function(){ if($('.files-list li img').length == 0){ myDropzone.removeAllFiles(true); myDropzone.setupEventListeners(); } }); //dropzone will not be clickable after this action below if($('.files-list li').children('img').length > 0){ myDropzone.removeEventListeners(); } myDropzone.removeEventListeners (); Dropzone.autoDiscoview = false; vair valid_extensions= /(\.pdf|\.doc|\.docx|\.xls|\.xlsx|\.jpg|\.jpeg|\.png|\.tiff|\.wpd)$/i; $('#insurance_type').on('change',function(){ ins_Type=$(this).val(); }); $('#insurance_expirationdate').on('change',function(){ ins_Date=$(this).val(); }); myDropzone = new Dropzone("#dropzdoc",{ url: 'Your URL where to send the data to', //this is how extra pairameters got passed to dropzone sending: function(file, xhr, formData) { formData.append("insurance_type", ins_Type); //name and value formData.append("insurance_expirationdate", ins_Date); //name and value }, //end of sending extra pairameters acceptedFiles:".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.tiff,.wpd", dictInvalidFileType: "You can't upload files of this type, only png or jpg file", pairamName: "insurance_doc", createImageThumbnails:false, dictDefaultMessage: "<div style='text-align:left;'>- Select your Insurance Type.<br>\n\ - Select 1 Date.<br>\n\ - Drop your file here.<br><div>\n\ Only <span style='color:red;'>1</span> file is acccepted.", autoProcessQueue:false, maxFiles: 1 }); myDropzone.on("processing", function(file, progress) { $('#upload_process').fadeIn(); }); myDropzone.on("success", function(file,response) { $('#upload_process').fadeOut(); }); myDropzone.on("addedfile", function(file) { //test extension files if (this.files.length) { vair _i, _len; for (_i = 0, _len = this.files.length; _i < _len; _i++) { if(valid_extensions.test(this.files[_i].name)==false) { alert('Invalid file extension.\nAllowed file extensions: pdf, doc, docx, xls, xlsx, jpg, jpeg, png, tiff, wpd'); this.removeFile(file); return; } } ; //if all good then procced the queue if(ins_Type !==''&& ins_Date !==''){ this.options.autoProcessQueue = true; this.processQueue(); }else{ alert('Date aire empty'); this.removeAllFiles(file); } }); //dropzone willl be clickable after this action below $('.files-list').on('click','img', function(){ if($('.files-list li img').length == 0){ myDropzone.removeAllFiles(true); myDropzone.setupEventListeners(); } }); //dropzone will not be clickable after this action below if($('.files-list li').children('img').length > 0){ myDropzone.removeEventListeners(); } 
    JavaScript é a melhor linguagem de programação de script e tem Node.js, AngularJS, vue.js e muitos bons framework JS.