MCPcopy Create free account
hub / github.com/callstackincubator/react-native-fast-io / pickFile

Function pickFile

example/tests/filesystem.tsx:12–17  ·  view source on GitHub ↗
(options?: Parameters<typeof showOpenFilePicker>[0])

Source from the content-addressed store, hash-verified

10 const [file, setFile] = useState<File | null>(null)
11
12 const pickFile = async (options?: Parameters<typeof showOpenFilePicker>[0]) => {
13 const [fileHandle] = await showOpenFilePicker(options)
14 const file = await fileHandle.getFile()
15 // @ts-ignore
16 setFile(file)
17 }
18
19 const sendFile = async (compression?: 'gzip' | 'deflate' | 'deflate-raw') => {
20 if (!file) {

Callers 1

FileSystemUIFunction · 0.85

Calls 2

showOpenFilePickerFunction · 0.90
getFileMethod · 0.80

Tested by

no test coverage detected