Module: ojfilepickerutils

Oracle® JavaScript Extension Toolkit (JET)
15.1.0

F83698-01

QuickNav

JET Modules

See JET Module Loading for an overview of module usage within JET.

Functions

pickFiles(callback, fileOptions)

This method invokes the native file picking UI. It invokes the specified callback with the result of the user's selection, if any.
Parameters:
Name Type Description
callback (files:FileList) => void Callback function invoked with the result of the user's selection, if any.
fileOptions FileOptions An object containing the file selection properties including accept, capture, and selection mode.

Type Definitions

FileOptions

Properties:
Name Type Description
accept Array.<string> An array of strings of allowed MIME types or file extensions that can be uploaded. If not specified, all file types will be accepted
capture 'user' | 'environment' | 'implementation' | 'none' Specifies the preferred facing mode for the device's media capture mechanism. 'user', 'environment', and 'implementation' indicates the user-facing, environment-facing, and the implementation-specific cameras will, respectively, be the preferred mode. Specifying 'none', the default, will indicate that no capture mechanism is used.
selectionMode 'single' | 'multiple' Whether to allow single or multiple file selection. Single is the default.