Vydia / react-native-background-upload

Upload files in your React Native app even while it's backgrounded. Supports Android and iOS, including camera roll assets.
MIT License
721 stars 325 forks source link

Android feature: multiple files upload in one shot via multipart, issue #240 #266

Open varunon9 opened 3 years ago

varunon9 commented 3 years ago

Summary

Android only support for uploading multiple files in one go Issue: https://github.com/Vydia/react-native-background-upload/issues/240

Test Plan

What's required for testing (prerequisites)?

What are the steps to reproduce (after prerequisites)?

const onChooseImagesPress = () => {
  launchImageLibrary({
    selectionLimit: 20
  }, ({assets}) => {
    const uploadConfig = {
      url: 'https://httpbin.org/post',
      //type: 'multipart',
      method: 'POST',
      notification: {
        enabled: true
      },
      useUtf8Charset: true
    };
    startUpload({
      ...uploadConfig,
      files: assets.map(asset => ({
        path: asset.uri.substr(7),
        field: asset.fileName
      }))
    })
  });
};

Compatibility

OS Implemented
iOS
Android

Checklist