CORS Problem Uploading to Server Using ES3Cloud

Discussion and help for Easy Save 3
Post Reply
JamesL
Posts: 1
Joined: Sat Dec 04, 2021 7:49 am

CORS Problem Uploading to Server Using ES3Cloud

Post 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
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: CORS Problem Uploading to Server Using ES3Cloud

Post 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
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply