yes i am, the endpoint is using https
Are both being accessed with localhost as hostname?
no, the instance is run on a server with a domain name, i dont have docker installed for local instance.
You might need to have your app running on the same base domain. You can edit your hosts file if you don't want to actually set up a DNS record
So it wont work across different domains? Is it limited to file preview or every storage bucket functions including download?
Download should work fine. View may not. This is due to browsers blocking 3rd party cookies
Also, opening the url directly on my browser gives the same error
{"message":"The requested file could not be found.","code":404,"type":"storage_file_not_found","version":"1.2.0"}
Your url includes the project right?
Yes
but just adding &mode=admin at the end of the same url without changing any other value shows the preview...
Don't include that. Mode admin would attempt to access it as your admin account thats used for the appwrite console
I am authenticated in the AppWrite dashboard so that works, but opening the url without the admin mode does not work.
download returns 404 too..
is there a way to get the file across different domains using client web sdk
Not using the IMG html element
What's the problem with having the two share the same base domain?
there will be another sub product on a different domain, so sharing user info across different domains would be useful.
Sorry I don't quite follow
users will create an account on abc.com but we host a different website which is a sub product of abc.com on xyz.com, so sharing user information from abc.com to xyz and not having to create different appwrite instances or making user create multiple accounts would be useful i guess.
So it's possible to have your project accessed on multiple domains. Your abc.com can hit Appwrite at appwrite.abc.com. xyz.com can access appwrite.xyz.com, etc. this way the cookies will pass through fine
so are you suggesting to create a appwrite instance on xyz.com with the same backend (database, storage) as abc.com?
No, they all use the same Appwrite instance, but you set up custom domains (cname DNS records that point to your Appwrite main domain)
Oh gotcha
I guess this could work and for localhost i can use the hosts file as you suggested earlier
Thanks for the help, i would give this a try
Recommended threads
- Storage files aren’t showing on mobile
hi, what can be the problem? i have a storage and there are images in it, the permissions are read for All Users, everything is fine on desktop, but on mobile t...
- Delete storage files all at once
I am using Appwrite Cloud. I want to delete all storage files in my bucket similar to how I can select all documents in a collection and delete them all at once...
- Storage images are not showing on mobile
Hi, can anyone help me? I have some images on the storage, and it is not shown on mobile, on desktop everything is fine.