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
- Need help to create a wrapper which let ...
I’m looking for help setting up Appwrite properly on a VPS so I can build a self-hosting wrapper around it. The goal is to provide a Linux executable that allow...
- Create file is listing files instead of ...
This is a bit strange but, I cannot create files from within a funcion. I have tested with latest SDKs versions of node and python, both instead of creating the...
- Trouble Creating Database and Collection...
I’ve set up my project credentials (endpoint, project ID) and generated an API key. I’m currently focusing on creating only the database and collections (tables...