Hello,
I'm self hosting a project via docker on a linux server. Just noticed a weird issue. While it works on my laptop to open a page of my project (using Sveltekit) and upload files to a storage bucket I get this error trying the exact same on my phone Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at .../storage/bucket/...
I'm using Firefox on both devices and they are in the same network/wifi. There is no localhost involved. I'm calling the exact same url on my server.
#[SOLVED]413 Request Entity Too Large (incorrectly showing CORS error)
23 messages · Page 1 of 1 (latest)
Btw. opening that page on my phones browser works fine. Just the call to upload files to the storage bucket causes the CORS issue.
I also recently updated to 1.5.4
Now it doesn't work on my laptop anymore neither 😦
It worked. I can see the uploaded files in the dashboard.
There are also function executions which also work fine. So it seems to only affect the storage call.
UPDATE: One more thing I just noticed. Why I said that it worked on my laptop before. I just noticed that the example file on my laptop was smaller in size. So I just tried it again and it seems that uploading a file with a couple hundred kilobytes works whereas another file with 2,2 megabytes doesn't work and shows that CORS error which does make even less sense to me now.
I checked the max. file size in the bucket settings several times and it's set to 30 MB. I don't get it.
Anyone?
Hey, sorry
You need to create a new web app under your project with the public url your svelte app is running on
I already changed it in my existing web app. Isn't that enough?
On appwrite, goto your project home under “Integrations” then select “Add Platform”
There you select Web app
Then enter the url of your svelte app
That’s what I meant by “create a new web app…” had you done this?
Yea I have that since the beginning.
It had wildcard first but I changed the hostname to my apps domain.
I changed it back to localhost and added another one like you said with my domain. Doesn't help.
@fickle dagger it also doesn't work with *
Also, why does it work with low file size?
Is there anything I can provide for you to help me debug it? Also, can I change the title of this thread? I guess "CORS issue when uploading files larger than 1mb" would be more accurate.
Maybe the whole CORS thing was misleading. In my browsers debug panel on tab "answer" I see this message "413 Request Entity Too Large". This makes more sense. But I still don't know which setting is restricting it.
I added this to my appwrite nginx config client_max_body_size 20M;
Now it works.
[SOLVED]413 Request Entity Too Large (incorrectly showing CORS error)