Back

Error uploading file from React native document picker to Appwrite Bucket

  • 0
  • Android
  • General
  • Storage
  • Cloud
Aditya-2407-G
22 Mar, 2024, 09:20

Hey! I wanted my react native application to upload a pdf file to the Appwrite Bucket but when I use the document picker I face an error : "file should be of type File". When I change the type to File document picker gives an error that it wants the file to be of type DocumentpickerResponse

Can anyone help ?

TL;DR
Error uploading file from React Native document picker to Appwrite Bucket. Developers facing issues with file type - need it to be File but Document Picker wants DocumentPickerResponse. Solution: You can resolve this by converting the selected file to the desired type before uploading it to the Appwrite Bucket. This can be achieved by handling the conversion within your React Native code.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more