Closed sytolk closed 4 years ago
I am facing same issue
I guess thats because this library was only written to select only documents (pdf, images, text, audio, etc.)
It would be great if it was possible to send more file types since I'm facing the same issue on my side.
I guess thats because this library was only written to select only documents (pdf, images, text, audio, etc.)
It would be great if it was possible to send more file types since I'm facing the same issue on my side.
yes. i was facing this issue in ios. i have resolved this by providing more Utis to document picker for ios selection. i have declated Utis List as:
IosUtisList: [
'public.png',
'public.jpeg',
'com.adobe.pdf',
'public.data',
'org.gnu.gnu-tar-archive',
'public.tar-archive',
'org.gnu.gnu-zip-archive',
'org.gnu.gnu-zip-tar-archive',
'public.bzip2-archive',
'public.tar-bzip2-archive',
'com.apple.binhex-archive',
'com.apple.macbinary-archive',
'com.allume.stuffit-archive',
'public.zip-archive',
'com.pkware.zip-archive',
'public.content',
'public.disk-image',
]
and then i passed this list to document picker as:
const res = await DocumentPicker.pick({
//In case of ios provide custom utis list object
type:Platform.OS==='ios'?IosUtisList:DocumentPicker.types.allFiles
//end of res
});
Does that also work with Android devices?
@Hassaan68 That does not work !! the pick function expect a string not an array ! I'm trying to pick a (.db) file which is a type (public.database) in iOS !
hello, filtering file extensions is documented in the readme, see https://github.com/Elyx0/react-native-document-picker#typestringarraystring
and https://github.com/Elyx0/react-native-document-picker#documentpickertypes
thank you
If I select zip file in fileExplorer it is extracted and needs to choose compressed files instead of parent .zip