Quartz Headless docs/FileUploadDirective

Search documentation

Type to search the documentation.

API: Primitives

FileUploadDirective

Adds filtering and drag/drop selection events to a native file input.

Overview

Adds filtering and drag/drop selection events to a native file input. No upload is performed.

Selector

input[type="file"][qzFileUpload]

Inputs

Input Type Default Required Description
accept string ''
directory unknown false Transform booleanAttribute; reads as boolean.

Outputs

Output Payload Description
filesChange readonly File[]
rejected RejectedFile[]
cancelled void

Properties

Name Type Description
readonly dragActive WritableSignal<boolean>
readonly files WritableSignal<readonly File[]>

Public methods

onChange

onChange(): void

openPicker

openPicker(): void

Open the associated native picker from an accessible consumer action.

acceptDroppedFiles

acceptDroppedFiles(files: readonly File[]): void

Consume files from a dropzone without reading or uploading their contents.

Parameter Type Optional Description
files readonly File[]

onDragOver

onDragOver(event: DragEvent): void
Parameter Type Optional Description
event DragEvent

onDragEnter

onDragEnter(): void

onDragLeave

onDragLeave(event: DragEvent): void
Parameter Type Optional Description
event DragEvent

onDrop

onDrop(event: DragEvent): void
Parameter Type Optional Description
event DragEvent

isDisabled

isDisabled(): boolean