Page 1 of 1

CORS Problem Uploading to Server Using ES3Cloud

Posted: Sat Dec 04, 2021 8:03 am
by JamesL
I can download data from my external webserver using the ES3Cloud.DownloadFile() method successfully in WebGL, but when I try to upload data to my server using the ES3Cloud.DownloadFile() method, I get an error saying CORS is not set. I recently found that my webserver says that it blocks OPTION requests and there is no way to change this for now. When looking in the Firefox browser's console I have found out that when Uploading files, the application is sending an OPTION request and not a POST like when it downloads and this seems to be the problem. My question is, is there anything I can modify to make it not send OPTION and send a POST request instead? Thanks

Re: CORS Problem Uploading to Server Using ES3Cloud

Posted: Sat Dec 04, 2021 9:00 am
by Joel
Hi there,

WebGL enforces CORS when you make a cross-server request, which requires an OPTIONS request to be sent. As this is imposed by WebGL rather than at our end, the only way to prevent this would be to ensure that the WebGL build is on the same server as the resource you’re accessing.

All the best,
Joel