expo-document-picker
Version:
Provides access to the system's UI for selecting documents from the available providers on the user's device.
13 lines (10 loc) • 434 B
text/typescript
import ExpoDocumentPicker from './ExpoDocumentPicker';
import { DocumentPickerOptions, DocumentResult } from './types';
export { DocumentPickerOptions, DocumentResult };
export async function getDocumentAsync({
type = '*/*',
copyToCacheDirectory = true,
multiple = false,
}: DocumentPickerOptions = {}): Promise<DocumentResult> {
return await ExpoDocumentPicker.getDocumentAsync({ type, copyToCacheDirectory, multiple });
}