I read this: https://github.com/enyo/dropzone/wiki/Set-URL-dynamically , but I did not get success ... :( I have 1 form ...
And I am sending inputs using ajax.
ajax returns the new user id. at this point I want to change the dropzone for the url to set the path to the new user id.
$.ajax({ type: "POST", url: "class/inserir.php?funcao=teste", data: formdata, dataType: "json", success: function(json){ if(json.sucesso=="sim"){ alert("Wait! Sending Pictures."); this.options.url = "class/upload_img.php?"+json.id; myDropzone.processQueue(); }else{ location.href="home.php?ir=cad_animal&cad=nao&erro="+json.erro; } } }); var myDropzone = new Dropzone("#imagens", { url: "class/upload_imgteste.php", paramName: "file",
Sorry for my bad english!
Thanks to everyone.
source share