@optisolbusiness/react-native-s3file-upload
TypeScript icon, indicating that this package has built-in type declarations

0.0.12 • Public • Published

react-native-s3file-upload

@optisolbusiness/react-native-s3file-upload

Installation

npm i @optisolbusiness/react-native-s3file-upload
npm i react-native-fs

If using iOS please remember to install cocoapods by running: npx pod-install

Usage

import { S3FileUpload } from "@optisolbusiness/react-native-s3file-upload";

// ...
      <S3FileUpload
        Config={{ s3Region: '', ImageUrl: '', identityPoolId: '', bucketName: '', }}
        file={[{name: '',size: '',type: '',uri:''}]}
        onProgress={(progress) => }
        response={(response) => }
        error={(error) => }
      />
      

To file parameter you can pass the object response from an image picker library, document picker library, or other file selection library that returns an object with a type, uri property representing the file path. You can pass either images, videos, documents to file parameter.

For uploading videos in android size should be less than 40 mb and in ios should be less than 160 mb

Props

Prop Type Description
config Object Mandatory. Pass s3Region, ImageUrl, identityPoolId, bucketName
file Array of Object Mandatory. Need to pass file details
response Array of Object Mandatory. To get Response Object
onProgress Number Optional. Will get progress value
error Object Optional. To get Error response

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

Dependencies (4)

Dev Dependencies (20)

Package Sidebar

Install

npm i @optisolbusiness/react-native-s3file-upload

Weekly Downloads

1

Version

0.0.12

License

MIT

Unpacked Size

41.2 kB

Total Files

27

Last publish

Collaborators

  • shyamsundars
  • sujipriya
  • saisushma
  • silambarasan_1996
  • tharmadurai
  • ramprasath.raja