Back

Cors Error for Video Upload

  • 0
  • Web
  • Storage
  • Realtime
Yahya Hassan
7 Sep, 2024, 07:32

Whenever I try to upload videos to my storage, I get an error saying my origin has been blocked by CORS policy and it fails to upload my video.

It works 100% fine when I try to upload Images or files but when I try to upload video Cors error occur

I have added platforms for both localhost and *.vercel.app and tried * but it is not working for video upload.

I was able to upload video, files, images completely fine till day before yesterday. But when I Opened my code yesterday, out of nowhere it stopped working, also it let me upload the video a time or two when a added a new platform for vercel and uploaded a video from vercel app then started giving Cors Error for the same code and same platform.

TL;DR
Issue: CORS error occurring specifically for video uploads, even though images and files upload correctly. Previously working fine, but suddenly stopped working and started giving CORS error. Solution: Check CORS policy settings for video uploads, ensure platforms for localhost and *.vercel.app are added correctly. Consider any recent changes to the code that may have caused the issue, such as inadvertently changing CORS settings.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more