Formwright
    Preparing search index...

    Interface FileUploadControlSignature

    interface FileUploadControlSignature {
        Args: ControlWiring<unknown> & object & {
            accept?: string;
            dropHint?: string;
            dropLabel?: string;
            locale?: string;
            optionLabel?: OptionAccessor;
            prompt?: string;
            rejectedLabel?: (names: string) => string;
            removeLabel?: (name: string) => string;
            retryLabel?: string;
            upload?: UploadFn;
            uploadingLabel?: (name: string) => string;
        };
        Element: HTMLDivElement;
    }
    Index
    Args: ControlWiring<unknown> & object & {
        accept?: string;
        dropHint?: string;
        dropLabel?: string;
        locale?: string;
        optionLabel?: OptionAccessor;
        prompt?: string;
        rejectedLabel?: (names: string) => string;
        removeLabel?: (name: string) => string;
        retryLabel?: string;
        upload?: UploadFn;
        uploadingLabel?: (name: string) => string;
    }

    Type Declaration

    • Optionalaccept?: string

      The file types to offer, as for <input accept>: .pdf, image/*, text/csv, ...

    • OptionaldropHint?: string

      Follows the prompt where files can be dropped. Default "or drop here".

    • OptionaldropLabel?: string

      Shown while files are dragged over the drop zone. Default "Drop to add".

    • Optionallocale?: string

      Formats file sizes. Default the browser's locale.

    • OptionaloptionLabel?: OptionAccessor

      Names a stored value that isn't a File (what @upload resolved to).

    • Optionalprompt?: string

      The drop zone's call to action. Default "Choose a file" or "Choose files".

    • OptionalrejectedLabel?: (names: string) => string

      The message for dropped files @accept turned away. Default "Not an accepted type: …".

    • OptionalremoveLabel?: (name: string) => string

      A file's remove button's accessible name. Default "Remove ".

    • OptionalretryLabel?: string

      The button that retries a failed upload. Default "Retry".

    • Optionalupload?: UploadFn

      Uploads each chosen file straight away; the field stores what it resolves to. Without it, the field stores the File itself.

    • OptionaluploadingLabel?: (name: string) => string

      An upload's progress bar's accessible name. Default "Uploading ".

    Element: HTMLDivElement

    A wrapper around the drop zone and the file list, carrying the control's hooks.