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. This occurs exactly at one minute of upload time so I'm thinking it has to do with how long the upload is taking/how big the file size is. My max upload size set on my bucket is 5 GB and the mp4 files I'm trying to upload are around 50 mb. My uploading works fine when upload pictures, so I believe it has something to do with the file size of the mp4 files. I read that with larger file sizes, I need to break the file down into chunks in order for it to upload properly, but supposedly the SDK already does this for you so I'm not sure how to fix this. Here is my code for uploading a file (it is very basic):
export async function uploadFile(file: File) { try { const uploadedFile = await storage.createFile( appWriteConfig.storageId, ID.unique(), file ); return uploadedFile; } catch (error) { console.log(error); } }
Recommended threads
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...
- apple exchange code to token
hello guys, im new here 🙂 I have created a project and enabled apple oauth, filled all data (client id, key id, p8 file itself etc). I generate oauth code form...
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...