Hi, I'm writing an app with Expo, React Native and Appwrite Cloud. My goal is to upload an image to the bucket storage. I have tested the bucket with REST requests and that worked fine. However, I cannot get it to work with the Web SDK. I am using the newest version 13.0.0 but tested it also with older ones.
When I try calling const response = await api.uploadProfileImage(file) it catches this error: {"name":"AppwriteException","code":0,"type":"","response":""}
I tried it using different Files with the new File constructor from JS and also double checked all other params. I cannot make sense of the issue. Auth and DB both work fine in the project.
There's a problem with how react native handles multipart form data.
Use this workaround: https://github.com/appwrite/sdk-for-web/issues/27#issuecomment-1710914979
It worked with that, thanks <:appwriteheart:782571497393750036>
[SOLVED] Uploading File from React Native Client
Recommended threads
- Need Help with Google OAuth2 in Expo usi...
I'm learning React Native with Expo and trying to set up Google OAuth2 with Appwrite. I couldn't find any good docs or tutorials for this and my own attempt did...
- Different appwrite IDs are getting expos...
File_URL_FORMAT= https://cloud.appwrite.io/v1/storage/buckets/[BUCKET_ID]/files/[FILE_ID]/preview?project=[PROJECT_ID] I'm trying to access files in my web app...
- Got message for auto payment of 15usd fo...
how did this happen? 1. i claimed my 50usd credits via jsm hackathon - https://hackathon.jsmastery.pro/ 2. it asked me which org. to apply the credits on, i se...