uppy/packages/@uppy/react-native/file-picker/selectDocument.js
Andrew 15e97f5c65
react-native: Fix react native expo permissions (#2418)
* dash: Add support for AVIF images in thumbnails

I added support to load thumbnails when uploading AVIF images, by adding 'avif' to the regex. I also updated the unit test.

Note that support for this is dependant on browser support, and currently only Chrome 85+ and Firefox 77+ support it (Firefox requires flag to be set to allow it)

* Allowed HTML Attributes to be passed via props

This fix still needs some work, as certain attributes could be passed to Uppy or as an HTML attribute, such as target

When this is fixed, this will resolve #2403

* fix: Fixed issues caused by moved dependencies

* Revert "Allowed HTML Attributes to be passed via props"

This reverts commit d7f8076fb3.

* Fixed dependencies
2020-08-31 11:53:45 +01:00

13 lines
328 B
JavaScript

import * as DocumentPicker from 'expo-document-picker'
function selectDocumentWithExpo (options) {
return DocumentPicker.getDocumentAsync({
copyToCacheDirectory: false
}).then((result) => {
if (!result.cancelled && result.type !== 'cancel') {
return result
}
})
}
export default selectDocumentWithExpo