
I use Appwrite storage to store some images and generate previews for them. When I develop my React app locally, all works well. However when I deploy it to Vercel, images won't load and I get the 401 unauthorized response from the server.
I've added Vercel deploymnet to my platforms, and otherwise contacting Appwrite works (e.g. to work with the database).

Update: for some reason, when I logged out and back in to my application, it worked. I suspect has to do something with the fallbackCookies: e.g. they could have been stored in the browser under the localhost but not the deployed website's host...

Update 2: from the mobile device, the workaround of logging out and back in did not work.

You might be running into a 3rd party cookie problem. see https://appwrite.io/docs/custom-domains

Were you able to try in incognito mode once?

<:plusone:775475804431581286>

Can you try giving any permissions to the file and see if that addresses the issue? If it does, it might be a 3rd party cookie problem

Setting the permission of the database to Any solved it. So to prevent the 3rd party cookies issue, the only way is to own a custom domain? Is there any way to resolve this problem without purchasing a domain and without setting the permissions to Any?

Yes and not possible

A domain is needed for first party cookies

[SOLVED] Unable to load images when hosted on Vercel

Yeah so third party cookies is a problem caused by new security features of modern browsers
Recommended threads
- Unable to read session cookie
Hi, when I am hitting Appwrite **/account** API. I am getting the user account details as expected in the response. However, with that API, Appwrite also adds a...
- Database error
My code: await databases.createDocument( process.env.APPWRITE_DATABASE, process.env.APPWRITE_COLLECTION_USER, data.userId, ...
- How to run queries to get the storage li...
I installed the n8n (self-hosting) and community node n8n-nodes-nappwrite. I tried to get the storage list files more than 25 records. But I cannot find the w...
