
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
- CORS errors with storage bucket
I have a javascript file in the storage bucket and I used the view endpoint in an `src` attribute of a `<script>` tag. But I am getting the `net::ERR_BLOCKED_BY...
- Oauth2-Error 400Invalid `success` param:...
My code: > await new Account(client).createOAuth2Session(OAuthProvider.Google, 'https://www.mydomain.online/home', 'https://www.mydomain.online'); I ha...
- Settings page on storage in a bucket goe...
When navigating to a settings page in a bucket i recieve a 404 with the following error: ``` 2025-06-06T12:02:46.582655899Z [Error] File: /usr/src/code/app/cont...
