Filepicker

Filepicker

FilePicker that works both offline and online. It abstracts the file storage/cache away with the injected fileManager.

Constructor

new Filepicker()

Source:

Extends

Members

(static) selector :string

Source:
Type:
  • string

(readonly) downloadButtonHtml :Element

Source:
Inherited From:

Returns a HTML document fragment for a download button.

Type:
  • Element

(readonly) originalInputValue :*

Source:
Overrides:

Obtains the value from the original form control the widget is instantiated on. This form control is often hidden by the widget.

Type:
  • *

props :object

Source:
Overrides:
Type:
  • object

(readonly) resetButtonHtml :Element

Source:
Inherited From:

Returns a HTML document fragment for a reset button.

Type:
  • Element

value :string

Source:
Overrides:
Type:
  • string

Methods

_getProps() → {object}

Source:
Inherited From:

Not meant to be overridden, but could be. Recommend to extend get props() instead.

Returns:

props object

Type
object

_init()

Source:
Overrides:

Meant to be overridden, but automatically called.

_resizeFile(file, mediaType) → {Promise.<(Blob|File)>}

Source:
Parameters:
Name Type Description
file File

image file to be resized

mediaType string

media type

Returns:

resolves with blob, rejects with input file

Type
Promise.<(Blob|File)>

_setChangeListener()

Source:

Handles change listener

_setFocusListener()

Source:

Handle focus listener

_setResetButtonListener(resetButton)

Source:

Click action of reset button

Parameters:
Name Type Description
resetButton Element

reset button HTML element

_showFeedback(fb, statusopt)

Source:
Parameters:
Name Type Attributes Description
fb TranslatedError | Error

Error instance

status string <optional>

status

_showFileName(fileName)

Source:

Sets file name as value

Parameters:
Name Type Description
fileName string

filename

_showPreview(url, mediaType)

Source:
Parameters:
Name Type Description
url string

URL

mediaType string

media type

Source:
Parameters:
Name Type Description
objectUrl string

ObjectURL

fileName string

filename

_updatePlaceholder()

Source:

Updates placeholder

disable()

Source:
Overrides:

Disables widget

enable()

Source:
Overrides:

Enables widget

update()

Source:
Inherited From:

Updates form-defined language strings,