GCWizard icon indicating copy to clipboard operation
GCWizard copied to clipboard

Loading files on web

Open S-Man42 opened this issue 2 years ago • 4 comments

We often have the problem with the GWCOpenFile in the web view. Most of the images given by an URL cannot be loaded as well as GWC/LUA files.

I guess, it's a combination of async operations and the http package. We should put some effort into this, to get the File/WIG functions working on the web version.

S-Man42 avatar Mar 24 '22 10:03 S-Man42

grafik

The problem seems to be that CORS has to be allowed on server-side: https://stackoverflow.com/questions/65630743/how-to-solve-flutter-web-api-cors-error-only-with-dart-code#74783428 So maybe https://enable-cors.org/server.html helps

capoaira avatar Sep 26 '23 10:09 capoaira

Hm, interesting.... Now I have to evaluate, how to make my provider allowing CORS (we don't really run a fully own manageable server unfortunately)...

S-Man42 avatar Sep 26 '23 10:09 S-Man42

Hm, interesting.... Now I have to evaluate, how to make my provider allowing CORS (we don't really run a fully own manageable server unfortunately)...

Ok, but even if you can solve this, I unfortunately just noticed that the server from which the image is requested must also allow CORS. 😕

capoaira avatar Sep 26 '23 11:09 capoaira

Hm, interesting.... Now I have to evaluate, how to make my provider allowing CORS (we don't really run a fully own manageable server unfortunately)...

Ok, but even if you can solve this, I unfortunately just noticed that the server from which the image is requested must also allow CORS. 😕

Looks like this Problem is not really possible to solve 😢: https://docs.flutter.dev/platform-integration/web/web-images#cross-origin-images

capoaira avatar Sep 26 '23 12:09 capoaira