Back

I am unable to fetch file

  • 1
  • Web
  • Storage
ajay -groot
15 Oct, 2023, 14:45

I am unable to fetch image from file preview method

TL;DR
The user is unable to fetch a file, specifically an image, using a file preview method. Other users suggest potential solutions such as enabling third-party cookies, checking the rendered HTML, and reviewing network logs. The user also mentions granting storage permission to all guests, which allows the image to be shown but not when only granted to a user. The issue is eventually solved, although the solution is not mentioned in the thread.
Drake
15 Oct, 2023, 16:45

What are the console and network logs from your browser dev tools?

ajay -groot
16 Oct, 2023, 05:37

If i manually call service .getfile() i get a url but i am call in img tag the url is not fetch

ajay -groot
16 Oct, 2023, 05:38

I am store the preview fileID in post as IMAGE

Drake
16 Oct, 2023, 05:39

Network logs for the image please

ajay -groot
16 Oct, 2023, 05:46
ajay -groot
16 Oct, 2023, 07:35

My issue is now solve

ajay -groot
16 Oct, 2023, 07:36

But i give storage permission to all guest it show image but if i give only to user image is not render

Drake
18 Oct, 2023, 16:22

uhhhh those urls don't seem right 🧐 what is the rendered HTML?

Drake
18 Oct, 2023, 16:25

you're probably running into a cookie problem. to get it to work, you'll need to enable 3rd party cookies in your browser or make sure the cookies are 1st party cookies (see https://appwrite.io/docs/custom-domains)

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