Trouble using FileSystem.FileSystemUploadType constants

Please provide the following:

  1. SDK Version: ~45.0.0
  2. Platforms(Android/iOS/web/all): Android/IOS
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

So i’m building a marketplace mobile app using, expo that let users upload products to the marketplace. I’m having difficult times using the expo FileSystem.FileSystemUploadType to pick the image and send to the backend. here’s my front-end code

const handleSubmit = async (listing, { resetForm }) => {
    const data = new FormData();
    data.append("images", listing.images[0]);
    data.append("description", "Good product");

    console.log( listing.images[0])
   // it does console the file uri
   // file:///Users/zakisb/Library/Developer/CoreSimulator/Devices/83E12EA5-E8FA-4850-82C1-84021B25450D/data/Containers/Data/Application/6873BF40-26E4-4BD3-834D-F6772448C004/Library/Caches/ExponentExperienceData/%2540anonymous%252Flokazz_app2-5f4724db-b9d7-45aa-a8ca-ac5acf2f4780/ImagePicker/B72CF40C-EC27-430E-B1F8-B983C0ACF2FB.jpg
  // i tried this solution first and worked perfectly. but it does upload the image only and i want to send the formdata object
 const response = await FileSystem.uploadAsync(
        fieldName: "images",
        uploadType: FileSystem.FileSystemUploadType.MULTIPART,

   // so i tried this but i get an error
    const response = await FileSystem.FileSystemUploadType.MULTIPART(

My backend works perfectly. i tried the api call using insomnia and postman the file gets uploaded successfully to the folder. but using expo methods i get nothing.

const storage = multer.diskStorage({
  destination: function (req, file, cb) {
    cb(null, "./images");
  filename: function (req, file, cb) {
    cb(null, + file.originalname);
  async (req, res) => {
    try {
    } catch (err) {
      res.send("Error " + err);

Please help !

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