0.2.7 • Published 3 years ago
react-native-pure-file-picker v0.2.7
react-native-pure-file-picker
This is a module which help you pick a document file, such as word, excel, ppt and pdf.
Installation
npm i react-native-pure-file-picker
// link below 0.60
react-native link react-native-pure-file-picker
Setup
iOS
Capabilities
-> iCloud
, check iCloud Documents
.
Android
Add jitpack
in your android/build.gradle
at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Usage
import filePicker from 'react-native-pure-file-picker'
// At first, make sure you have the permissions.
// ios: nothing
// android: WRITE_EXTERNAL_STORAGE
// If you don't have these permissions, you can't call open method.
// The first `options` param is just available for android.
filePicker.open({
// optional
submitButtonTitle: '确定',
// optional
cancelButtonTitle: '取消',
// optional
dateFormatCurrentDate: 'HH:mm',
// optional
dateFormatCurrentYear: 'MM月dd日',
// optional
dateFormatAnyTime: 'yyyy年MM月dd日',
})
.then(file => {
let { path, name, size } = file
})
.catch(() => {
// click cancel button
})
0.2.7
3 years ago
0.2.6
4 years ago
0.2.5
5 years ago
0.2.3
5 years ago
0.2.4
5 years ago
0.2.1
5 years ago
0.2.2
5 years ago
0.2.0
5 years ago
0.1.9
6 years ago
0.1.8
6 years ago
0.1.6
6 years ago
0.1.5
6 years ago
0.1.4
6 years ago
0.1.3
6 years ago
0.1.2
6 years ago
0.1.1
6 years ago
0.1.0
6 years ago
0.0.9
6 years ago
0.0.8
6 years ago
0.0.7
6 years ago
0.0.6
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago