Skip to content

File Upload

Forms

A drag-and-drop file upload zone with a built-in file list. Supports single or multiple files, file type filtering, and max size validation.

atlas-file-upload

Examples

Drop zone

Click or drop files. accept and maxSize filter them; rejected files emit (fileTooLarge) .

Click or drag files to upload

PDF or images up to 2 MB

Images with a size limit

accept filters the file picker, multiple allows several files and maxSize (bytes) rejects big ones: they are left out of the value and reported through (fileTooLarge) . The rejection message sits in a polite live region so screen readers announce it.

Product photos

PNG or JPG, up to 1 MB each.

A single document

Without multiple , a new file replaces the current one. label and hint name and describe the drop zone; accept takes extensions as well as MIME types.

Signed contract

One PDF file.

No file yet

API

Generated from the library source, so it always matches the code.

AtlasFileUploadComponent atlas-file-upload

InputTypeDefaultDescription
accept string'' Accepted file types (e.g. '.pdf,.docx' or 'image/*')
multiple booleanfalse Allow multiple files
maxSize number0 Max file size in bytes (0 = no limit)
label string | undefinedundefined Label text displayed in the dropzone. Defaults to the configured fileUpload.label ; '' hides it.
hint string | undefinedundefined Hint text displayed below the label
disabled booleanfalse Whether the upload is disabled
errors readonly ValidationError.WithOptionalFieldTree[][] Validation errors of the bound field. Set by Signal Forms [field] .
required booleanfalse Whether a value is required. Set by Signal Forms [field] .
invalid booleanfalse Whether the field is invalid. Set by Signal Forms [field] .
touched booleanfalse Whether the user has interacted with the field. Set by Signal Forms [field] .
readonly booleanfalse Whether the field is read-only. Set by Signal Forms [field] .
pending booleanfalse Whether async validation is running. Set by Signal Forms [field] .
name string'' Name of the field. Set by Signal Forms [field] .
ariaLabel string | nullnull Accessible name when no visible label names the control (use one or the other, WCAG 2.5.3).
inputId string | undefinedundefinedid of the focusable element, so a visible <label atlasLabel for="…"> names it. Inside atlas-form-field the field supplies one.
ariaDescribedBy string | nullnull Extra ids for aria-describedby , merged with the surrounding form field's hint or error.
class string'' Extra CSS classes, merged with the component's own through cn() ; yours win on conflicts.
value two-wayUploadedFile[][] The accepted files (two-way, or Signal Forms [field] ). Files over maxSize are left out and reported through fileTooLarge .
OutputPayloadDescription
touchvoid Emits when the control loses focus, so Signal Forms marks the field touched.
filesAddedUploadedFile[] Emitted when files are added
fileRemovedUploadedFile Emitted when a file is removed
fileTooLargeFile Emitted when a file exceeds maxSize

Types

UploadedFile

PropertyTypeDescription
file File Original file reference
name string File name
size number File size in bytes