Class FileUpload

File upload component

Hierarchy (View Summary)

Constructors

Properties

_$root: HTMLElement
$announcements: HTMLSpanElement
$button: HTMLButtonElement
$status: HTMLSpanElement
enteredAnotherElement: boolean
i18n: I18n
id: string
defaults: FileUploadConfig = ...

File upload default config

elementType: new () => Element = HTMLElement
moduleName: string = 'govuk-file-upload'

Name for the component used when initialising using data-module attributes.

schema: Readonly<{ properties: { i18n: { type: "object" } } }> = ...

File upload config schema

Accessors

Methods

  • Private

    Looks up the <label> element associated to the field

    Returns HTMLElement

    The <label> element associated to the field

    If the <label> cannot be found

  • Updates the visibility of the dropzone as users enters the various elements on the page

    Parameters

    • event: DragEvent

      The dragenter event

    Returns void