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. Also, this only occurs on Google Chrome on my PC, uploading works on my laptop with Google Chrome and it works on my PC with Microsoft Edge, but it fails on my PC when I use Google Chrome. 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
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...
- Sign In With Apple OAuth Help
Hi All! I've got a flutter & appwrite app which Im trying to use sign in with apple for. I already have sign in with google working and the function is the sam...