selectDocument.js 328 B

12345678910111213
  1. import * as DocumentPicker from 'expo-document-picker'
  2. function selectDocumentWithExpo (options) {
  3. return DocumentPicker.getDocumentAsync({
  4. copyToCacheDirectory: false
  5. }).then((result) => {
  6. if (!result.cancelled && result.type !== 'cancel') {
  7. return result
  8. }
  9. })
  10. }
  11. export default selectDocumentWithExpo