FileSystem.uploadAsync uploading multiple data with additional request body?

Please provide the following:

  1. SDK Version: 48
  2. Platforms(Android/iOS/web/all): iOS and Android

I have an express backend and Im creating an edit profile endpoint. Profile has 2 files which is header and profilePhoto. Also I need to send additional request body such as name and bio for example. How can I do this with FileSystem.uploadAsync?

To use FileSystem.uploadAsync in your express backend for an edit profile endpoint with two files (header and profilePhoto) and additional request body parameters (name and bio), you can receive the request in your endpoint, extract the necessary information such as name, bio, header file, and profilePhoto file from the request body. Then, use FileSystem.uploadAsync to upload each file to the desired location on the server by providing the file’s local URI, destination URI, and including the additional request body parameters as part of the options object. Adjust the field names, MIME types, headers, and file paths according to your backend setup. Make sure to handle any errors and validations during the upload process.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.