govuk-frontend
    Preparing search index...

    Class FileUpload

    File upload component

    Hierarchy (View Summary)

    Index

    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

    • Private

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

      Parameters

      • event: DragEvent

        The dragenter event

      Returns void