Hi, I'm developing a chat app using Appwrite as the backend server and Angular for the Frontend. Appwrite is running locally on docker. Authentication and Database access works fine but I'm having troubles with the Storage. Currently I'm using it to store images. Creating the files and getting the URLs works fine but i need to get the image data, that's why I'm trying to fetch the URL. When doing so I'm getting the CORS policy error in the screenshot. I've already added a web platform to Appwrite with the hostname 'localhost', and also tried '*' but neither works. Any help would be appreciated!
#[SOLVED] Fetch blocked by CORS policy
8 messages · Page 1 of 1 (latest)
Probably some ID is not correct
I don't think so, this.storage.getFileDownload(this.appwriteEnvironment.bucketId, fileId); works fine, but when I'm trying to fetch the URL I'm getting the error. Am I missing something?
this.storage.getFileDownload(this.appwriteEnvironment.bucketId, fileId);
All this does is creates a URL locally. it makes no API calls so it should always reutrn successfully.
what is your actual code?
strangely it works now. haven't changed anything. Thanks anyway for the help!
Weird 😵💫
Perfect then 😁