Back

[SOLVED] Is it possible to use a storage link for website image?

  • 0
  • Storage
djcali
19 Mar, 2023, 00:32

Hello, I'm creating a website with flutter and I know i can getFilePreview and convert the uint8List etc.. but it's a lot more work than just providing a link like Image.newtwork('https://website.com/v1/storage/buckets/web_images/files/xxxx/view?project=myproject' This works when I run the web app in VS Code/chrome but when I compile for web and upload to my server I'm getting a cors error like the image attached. The weird thing is? I don't get the cors error on Mobile Web because the image is loading. Any help appreciated. Thanks.

TL;DR
The user is asking if it is possible to use a storage link for a website image in Flutter. They originally thought they had implemented it correctly, but it was missing. The issue has been solved and they are marking it as solved. The user is also asking about adding a Flutter web platform to their project and if they can share the code where it was implemented. Another user mentions that there is no HTML with Flutter Web, it is all JavaScript. The original user is experiencing a CORS error when they compile and upload their web app to their server. The image loads without error on Mobile Web. They are seeking help and appreciate any assistance.
Binyamin
19 Mar, 2023, 00:34

I think that the images being load through fetch or something. Can you share the generated HTML

djcali
19 Mar, 2023, 01:28

Sorry No html with Flutter Web its all JavaScript

Binyamin
19 Mar, 2023, 01:28

Sure. Can you share the code where you implemented it

Drake
19 Mar, 2023, 01:47

Did you add a flutter web platform to your project?

djcali
19 Mar, 2023, 01:58

That was the issue, I thought I did but it was missing. All good now. Thanks. Mark as solved. lol

Drake
19 Mar, 2023, 03:19

[SOLVED] Is it possible to use a storage link for website image?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more