Cookies set then uploading to different subdomain

https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS
Then uploading to different subdomain xhr attribute "withCredentials" must be set to true