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
- Error getting preview of file
Rest Response: ``` { "message": "Server Error", "code": 500, "type": "general_unknown", "version": "1.8.1" } ``` Appwrite Logs ``` appwrite ...
- Storage images using custom domain retur...
Some of the images uploaded to my storage bucket returns this error: ``` { "message": "Project with the requested ID could not be found. Please check the value...
- Bandwidth limit for your organization ha...
I received an alert that I exceeded the Free plan bandwidth limit (showing 5.86 GB), but my dashboard tells a different story. The usage stats there are much lo...