### Hierarchy

- PickerOptions

## Index

### Properties

- accept
- allowManualRetry
- cleanupImageExif
- concurrency
- container
- customAuthText
- customSourceContainer
- customSourceName
- customSourcePath
- customText
- disableStorageKey
- disableThumbnails
- disableTransformer
- displayMode
- dropPane
- errorsTimeout
- exposeOriginalFile
- fromSources
- globalDropZone
- hideModalWhenUploading
- imageDim
- imageMax
- imageMin
- lang
- maxFiles
- maxSize
- minFiles
- modalSize
- onCancel
- onClose
- onFileSelected
- onFileUploadFailed
- onFileUploadFinished
- onFileUploadProgress
- onFileUploadStarted
- onOpen
- onUploadDone
- onUploadStarted
- rootId
- startUploadingWhenMaxFilesReached
- storeTo
- transformations
- uploadConfig
- uploadInBackground
- videoResolution
- viewType

## Properties

### Optional accept

accept: string | string[]

- Defined in lib/picker.ts:362

Restrict file types that are allowed to be picked. Formats accepted:

- .pdf <- any file extension
- image/jpeg <- any mime type commonly known by browsers
- image/* <- accept all types of images
- video/* <- accept all types of video files
- audio/* <- accept all types of audio files
- application/* <- accept all types of application files
- text/* <- accept all types of text files

### Optional allowManualRetry

allowManualRetry: boolean

- Defined in lib/picker.ts:366

Prevent modal close on upload failure and allow users to retry.

### Optional cleanupImageExif

cleanupImageExif: boolean | object

- Defined in lib/picker.ts:397

Turn on cleaning JPEG image exif. Method can keep image orientation

### Optional concurrency

concurrency: number

- Defined in lib/picker.ts:437

Max number of files to upload concurrently. Default is 4.

### Optional container

container: string | Node

- Defined in lib/picker.ts:392

Container where picker should be appended. Only relevant for `inline` and `dropPane` display modes.

### Optional customAuthText

customAuthText: CustomAuthTextOptions

- Defined in lib/picker.ts:429

Customize the text on the cloud authentication screen in Picker. Use a cloud source name (see PickerOptions.fromSources) or a 'default' as a key, then put your custom notice or consent to the 'top' or the 'bottom' key to show it respectivly above or under 'Connect button'.

    customAuthText: {
      // use it for every cloud authentication screen
      default: {
        top: [
          'default top first line',
          'default top second line'
        ],
        bottom: [
          'default bottom first line',
          'default bottom second line'
        ]
      },
      // override a default bottom text for only gmail
      gmail: {
        bottom: [
          'We need your permission to access your data and',
          'process it with our machine learning system.'
        ]
      }
    }

### Optional customSourceContainer

customSourceContainer: string

- Defined in lib/picker.ts:441

Set the default container for your custom source.

### Optional customSourceName

customSourceName: string

- Defined in lib/picker.ts:449

Set the display name for the custom source.

### Optional customSourcePath

customSourcePath: string

- Defined in lib/picker.ts:445

Set the default path for your custom source container.

### Optional customText

customText: PickerCustomText

- Defined in lib/picker.ts:455

Provide an object for mapping picker strings to your own strings. Strings surrounded by brackets, `{ foobar }`, are interpolated with runtime values. Source labels are also available to override, e.g. Facebook, Instagram, Dropbox, etc.

### Optional disableStorageKey

disableStorageKey: boolean

- Defined in lib/picker.ts:459

When true removes the hash prefix on stored files.

### Optional disableThumbnails

disableThumbnails: boolean

- Defined in lib/picker.ts:467

Disables local image thumbnail previews in the summary screen.

### Optional disableTransformer

disableTransformer: boolean

- Defined in lib/picker.ts:463

When true removes ability to edit images.

### Optional displayMode

displayMode: PickerDisplayMode

- Defined in lib/picker.ts:433

Picker display mode, one of `'inline'`, `'overlay'`, `'dropPane'` - default is `'overlay'`.

### Optional dropPane

dropPane: PickerDropPaneOptions

- Defined in lib/picker.ts:471

Configure the drop pane behavior, i.e. when `displayMode` is `dropPane`.

### Optional errorsTimeout

errorsTimeout: number

- Defined in lib/picker.ts:528

Timeout for error messages

### Optional exposeOriginalFile

exposeOriginalFile: boolean

- Defined in lib/picker.ts:475

When true the `originalFile` metadata will be the actual `File` object instead of a POJO

### Optional fromSources

fromSources: string[]

- Defined in lib/picker.ts:388

Valid sources are:

- local_file_system - Default
- url - Default
- imagesearch - Default
- facebook - Default
- instagram - Default
- googledrive - Default
- dropbox - Default
- webcam - Uses device menu on mobile. Not currently supported in Safari and IE.
- video - Uses device menu on mobile. Not currently supported in Safari and IE.
- audio - Uses device menu on mobile. Not currently supported in Safari and IE.
- box
- github
- gmail
- picasa
- onedrive
- onedriveforbusiness
- clouddrive
- customsource - Configure this in your Filestack Dev Portal.

### Optional globalDropZone

globalDropZone: boolean

- Defined in lib/picker.ts:479

Toggle the drop zone to be active on all views. Default is active only on local file source.

### Optional hideModalWhenUploading

hideModalWhenUploading: boolean

- Defined in lib/picker.ts:483

Hide the picker modal UI once uploading begins. Defaults to `false`.

### Optional imageDim

imageDim: [number, number]

- Defined in lib/picker.ts:490

Specify image dimensions. e.g. [800, 600]. Only for JPEG, PNG, and BMP files. Local and cropped images will be resized (upscaled or downscaled) to the specified dimensions before uploading. The original height to width ratio is maintained. To resize all images based on the width, set [width, null], e.g. [800, null]. For the height set [null, height], e.g. [null, 600].

### Optional imageMax

imageMax: [number, number]

- Defined in lib/picker.ts:496

Specify maximum image dimensions. e.g. [800, 600]. Only for JPEG, PNG, and BMP files. Images bigger than the specified dimensions will be resized to the maximum size while maintaining the original aspect ratio. The output will not be exactly 800x600 unless the imageMax matches the aspect ratio of the original image.

### Optional imageMin

imageMin: [number, number]

- Defined in lib/picker.ts:502

Specify minimum image dimensions. e.g. [800, 600]. Only for JPEG, PNG, and BMP files. Images smaller than the specified dimensions will be upscaled to the minimum size while maintaining the original aspect ratio. The output will not be exactly 800x600 unless the imageMin matches the aspect ratio of the original image.

### Optional lang

lang: string

- Defined in lib/picker.ts:506

Sets locale. Accepts: ca, da, de, en, es, fr, he, it, ja, ko, nl, no, pl, pt, sv, ru, vi, zh, tr

### Optional maxFiles

maxFiles: number

- Defined in lib/picker.ts:514

Maximum number of files allowed to upload. Defaults to 1.

### Optional maxSize

maxSize: number

- Defined in lib/picker.ts:518

Restrict selected files to a maximum number of bytes. (e.g. 10 * 1024 * 1024 for 10MB limit).

### Optional minFiles

minFiles: number

- Defined in lib/picker.ts:510

Minimum number of files required to start uploading. Defaults to 1.

### Optional modalSize

modalSize: [number, number]

- Defined in lib/picker.ts:532

Specify [width, height] in pixels of the desktop modal.

### Optional onCancel

onCancel: PickerUploadDoneCallback

- Defined in lib/picker.ts:536

Called when all uploads in a pick are cancelled.

### Optional onClose

onClose: function

- Defined in lib/picker.ts:540

Called when the UI is exited.

#### Type declaration

- - (): void

  - #### Returns void

### Optional onFileSelected

onFileSelected: PickerFileCallback

- Defined in lib/picker.ts:582

Called whenever user selects a file.

### Example

    // Using to veto file selection
    // If you throw any error in this function it will reject the file selection.
    // The error message will be displayed to the user as an alert.
    onFileSelected(file) {
      if (file.size > 1000 * 1000) {
        throw new Error('File too big, select something smaller than 1MB');
      }
    }

    // Using to change selected file name
    // NOTE: This currently only works for local uploads
    onFileSelected(file) {
      // It's important to return a new file by the end of this function.
      return { ...file, name: 'foo' };
    }

The callback function can also return a Promise to allow asynchronous validation logic. You can pass a file object to `resolve` for changing the file name, it will behave the same as when the file is returned from the non-async callback.

    onFileSelected(file) {
      return new Promise((resolve, reject) => {
        // Do something async
        resolve();
        // Or reject the selection with reject()
      });
    }

### Optional onFileUploadFailed

onFileUploadFailed: PickerFileErrorCallback

- Defined in lib/picker.ts:594

Called when uploading a file fails.

### Optional onFileUploadFinished

onFileUploadFinished: PickerFileCallback

- Defined in lib/picker.ts:590

Called when a file is done uploading.

### Optional onFileUploadProgress

onFileUploadProgress: PickerFileProgressCallback

- Defined in lib/picker.ts:598

Called during multi-part upload progress events. Local files only.

### Optional onFileUploadStarted

onFileUploadStarted: PickerFileCallback

- Defined in lib/picker.ts:586

Called when a file begins uploading.

### Optional onOpen

onOpen: function

- Defined in lib/picker.ts:545

Called when the UI is mounted.

param

  application handle

#### Type declaration

- - (handle: PickerInstance): void

  - #### Parameters

    - ##### handle: PickerInstance

    #### Returns void

### Optional onUploadDone

onUploadDone: PickerUploadDoneCallback

- Defined in lib/picker.ts:606

Called when all files have been uploaded.

### Optional onUploadStarted

onUploadStarted: PickerUploadStartedCallback

- Defined in lib/picker.ts:602

Called when uploading starts (user initiates uploading).

### Optional rootId

rootId: string

- Defined in lib/picker.ts:616

Define a unique id for the application mount point. May be useful for more advanced use cases. For example, if you wish to have more than one picker instance open at once, then each will need their own unique rootId.

Note: This option is ignored when `displayMode` is `dropPane`.

### Optional startUploadingWhenMaxFilesReached

startUploadingWhenMaxFilesReached: boolean

- Defined in lib/picker.ts:620

Whether to start uploading automatically when maxFiles is hit. Defaults to `false`.

### Optional storeTo

storeTo: PickerStoreOptions

- Defined in lib/picker.ts:624

Options for file storage.

### Optional transformations

transformations: PickerTransformationOptions

- Defined in lib/picker.ts:628

Specify options for images passed to the crop UI.

### Optional uploadConfig

uploadConfig: UploadOptions

- Defined in lib/picker.ts:632

Options for local file uploads.

### Optional uploadInBackground

uploadInBackground: boolean

- Defined in lib/picker.ts:637

Start uploading immediately on file selection. Defaults to `true`.

important

  The feature is can be enabled only if crop is disabled - disableTransformer: true

### Optional videoResolution

videoResolution: string

- Defined in lib/picker.ts:641

Sets the resolution of recorded video. One of "320x240", "640x480" or "1280x720". Default is `"640x480"`.

### Optional viewType

viewType: "grid" | "list"

- Defined in lib/picker.ts:523

Default view type option for file browser