react-native-file-upload
A file upload plugin for react-native written by Objective-C.
- Support to upload multiple files at a time
- Support to files and fields
Getting started
npm install react-native-file-upload --save
- In XCode, in the project navigator, right click
your project
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-file-upload
and addFileUpload.m
- Run your project (
Cmd+R
)
Usage
All you need is to export module var FileUpload = require('NativeModules').FileUpload;
and direct invoke FileUpload.upload
.
'use strict'; var React = ;var FileUpload = FileUpload; var AppRegistry StyleSheet Text View = React; var FileUploadDemo = React; var styles = StyleSheet; AppRegistry;
License
MIT