#[SOLVED] Fetch blocked by CORS policy

8 messages · Page 1 of 1 (latest)

onyx panther
#

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!

slate lichen
#

Probably some ID is not correct

onyx panther
#

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?

stone veldt
onyx panther
#

strangely it works now. haven't changed anything. Thanks anyway for the help!

slate lichen
#

Perfect then 😁