Hi! When I try to upload a video to Appwrite Storage, it gives me this error (it works with images but not with videos):
[AppwriteException: Server Error]
I use React Native, and this is the code:
TypeScript
const iid = ID.unique();
const url = new URL(finalPostData.attachment.uri)
const params = {
name: url.pathname.split('/').pop(),
size: finalPostData.attachment.fileSize,
type: finalPostData.attachment.mimeType.startsWith("video")
? "video"
: "image",
uri: url.href
}
const res = await storage.createFile(
appwriteConfig.postsAttachmentsBucketID,
iid,
params
);
TL;DR
Issue: Uploading videos to Appwrite Storage in React Native results in a server error, while it works for images.
Solution: Make sure the file type is correctly detected and passed when uploading. Check the mimeType and ensure it is identified as "video" for video files.Recommended threads
- Weird permission failure
when creating an account I use following methods: ``` Future<void> register(String email, String password, String username) async { final user = await accoun...
- Appwrite Storage error 503s for automate...
I'm facing error 503s from Appwrite after about 5-6 seconds of making AI requests from my tool with images and files above 20MB (=> not inline base64 used, but ...
- Flutter Android oAuth is no more working
I currently don't get the oAuth login to work in flutter android. it works on ios and on web. but when try to use it on Android, i get to the point where the ca...