@woshapp/react-native-background-upload
v6.16.0
Published
Cross platform http post file uploader with Android and iOS background support.
Downloads
117
Maintainers
Readme
@zivi/react-native-background-upload
Zivi-maintained fork of react-native-background-upload.
Fork history
- Original project: https://github.com/Vydia/react-native-background-upload (last release v6.6.0)
- Continuation fork: https://github.com/appfolio/react-native-upload (continued to v6.15.0)
- This repository continues from v6.15.0 under Zivi maintenance
Installation
yarn add @woshapp/react-native-background-upload
# or
npm install @woshapp/react-native-background-uploadiOS
cd ios && pod installAndroid
No additional steps required (autolinking).
Usage
import Upload from '@woshapp/react-native-background-upload'
const options = {
url: 'https://example.com/upload',
path: 'file://path/to/file',
method: 'POST',
type: 'raw',
}
Upload.startUpload(options)Multipart uploads
Upload.startUpload({
url: 'https://example.com/upload',
path: 'file://path/to/file.png',
field: 'file',
type: 'multipart',
})