Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add xhrFields to dropzone.js to send session data across domains

I just installed dropzone (http://www.dropzonejs.com/) on one of my sites to upload Images per drag an drop. It works good but I now try to upload Images from a subdomain of this page. It all works, but the session data is not send to the upload.php. On other ajax calls I just can add xhrFields: { withCredentials:true } and it will work as I wish. But in dropzone this Option does Nothing.

So can someone help me, so I can finish my function?

Thanks and sorry for my bad english (German Guy)

like image 465
kaiserkiwi Avatar asked Oct 20 '25 05:10

kaiserkiwi


1 Answers

Okay, it is really simple. Wrote the developer of dropzone.js and he helped me out. I don’t Need the xhrFields Argument. Just add withCredentials: true to the dropzone Options and it will work as expected.

like image 73
kaiserkiwi Avatar answered Oct 21 '25 20:10

kaiserkiwi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!