UNPKG

react-native-file-pick

Version:

A react native interface to access Documents from dropbox google drive, iCloud

40 lines (31 loc) 653 B
# react-native-file-pick ### Installation ```bash npm i --save react-native-file-pick react-native link react-native-file-pick ``` ## Example ```javascript import { FilePicker, FilePickerUtil } from 'react-native-file-pick'; // iPhone/Android FilePicker.show({ filetype: [FilePickerUtil.images()], },(error,res) => { // Android console.log( res.uri, res.type, // mime type res.fileName, res.fileSize ); }); // iPad const {pageX, pageY} = event.nativeEvent; FilePicker.show({ top: pageY, left: pageX, filetype: ['public.image'], }, (error, url) => { alert(url); }); ```