Pick files

Opens a native document picker, allowing you to pick one or more files from the device file system.

Opens a native document picker, allowing you to pick one or more files from the device file system.

File type categories are as follows, with Android using MIME types and iOS [Uniform Type Identifiers](https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html\):

  • allFiles: All document types, on Android this is */*, on iOS is is public.content (note that some binary and archive types do not inherit from public.content)

  • images: All image types (image/* or public.image)

  • plainText: Plain text files ie: .txt (text/plain or public.plain-text)

  • audio: All audio types (audio/* or public.audio)

  • pdf: PDF documents (application/pdf or com.adobe.pdf)

Input arguments

Label

Key

Type

Required?

Default

Description

File types

fileTypes

Array

Yes

allFiles

Array of file types to allow picking from.

Pick multiple files?

pickMultiple

Boolean

No

true

If true, allow the user to pick multiple files.

Output arguments

Number of outputs: 3

Label

Key

Type

Description

Files

files

Array

Array of file objects picked by the user.

Events

No events.

Errors

Label

Code

Description

Unknown error

unknown

Thrown if an unknown error occurred while picking files.