Skip to content

Upload Queue for Angular

AngularUpload

List of files being uploaded, with a Progress Bar per item, status (queued, uploading, done, failed, cancelled), cancel/retry/remove actions, and live announcements. Uploading is transport-agnostic: the consumer supplies upload(file, { signal, onProgress, attempt, id }); the queue adds a concurrency limit, AbortController cancellation, and retries with exponential backoff. It never performs a network request itself.

  • Bring your transportYou supply the upload function; fetch, XHR, or chunked uploads all fit.
  • Progress per fileEach item shows its progress, status, and size as it uploads.
  • Cancel and retryCancellation aborts the transfer through a signal; failed items can be retried.
  • Concurrency and retriesLimit parallel uploads and retry failures automatically with a delay.
  • Image previewsOptional previews for image files while they upload.

Behavior, design tokens, and limitations are described on the Upload Queue page; this page covers the Angular API.

import { Component, viewChild } from '@angular/core';
import { AuiUploadQueue } from '@absoluteui/angular/upload-queue';
import type { UploadFunction } from '@absoluteui/components/upload-queue';
@Component({
selector: 'app-uploads',
imports: [AuiUploadQueue],
template: `
<input type="file" multiple (change)="enqueue($event)">
<aui-upload-queue #queue="auiUploadQueue" label="Uploads" [upload]="upload" [concurrency]="3"></aui-upload-queue>
`,
})
export class UploadsComponent {
readonly queue = viewChild.required<AuiUploadQueue>('queue');
readonly upload: UploadFunction = async (file, { signal }) => (await fetch('/api/files', { method: 'POST', body: file, signal })).json();
enqueue(event: Event): void {
const input = event.target as HTMLInputElement;
this.queue().add(Array.from(input.files ?? []));
}
}
Terminal window
npm install @absoluteui/angular @absoluteui/components @absoluteui/core @absoluteui/theme

Setup with provideAbsoluteUI() is covered in Getting started. Styles are included with the component.

import { AuiUploadQueue } from '@absoluteui/angular/upload-queue';

Defaults for every instance: provideAbsoluteUIConfig({ components: { uploadQueue: { ... } } }) (see Configuration).

Class AuiUploadQueue; template reference #ref="auiUploadQueue".

Server rendering: Renders on the server; the browser re-creates it after hydration.

Input Type Default Description
label string Required. Visible label and accessible name of the list.
upload UploadFunction Required. Transport: performs one attempt. Resolve on success (the value becomes item.response), reject on failure, honour signal.
preview boolean false Image previews via object URLs for image/* files (needs img-src blob:).
errorMessage (error: unknown, file: File) => string | null Map a rejection to a user-facing message. Default: generic localized message.
icons Partial<UploadQueueIcons> Icon slot overrides.
concurrency number '2' Uploads running at the same time (1..16).
retries number '0' Automatic retries after a failed attempt (0..10).
retryDelay number '1000' Delay before the first automatic retry in ms (0..60000); doubles for each further retry.
autoStart boolean true Start uploading as soon as files are added; when false, call start().
locale string 'en-US' Message and size-formatting locale.
Output Payload Description
(changed) UploadQueueChangeDetail Items were added or removed, or an item changed status (not emitted for progress). Re-emits aui-change.
(completed) UploadQueueCompleteDetail Nothing is queued or uploading any more (once per batch). Re-emits aui-complete.
Property Type Description
busy Signal<boolean> Any item queued or uploading.

Call them through a viewChild query or a template reference.

Method Description
add(files: Iterable<File>): string[] | undefined Queue files; returns item ids.
start(): void Start queued items (autoStart: false).
cancel(id: string): void Cancel a queued or uploading item (aborts its signal).
cancelAll(): void Cancel every active item.
retry(id: string): void Queue a failed or cancelled item again.
remove(id: string): void Remove an item (aborts it; revokes its preview URL).
clear(): void Remove every item.
clearCompleted(): void Remove finished items.
getItem(id: string): UploadItem | null | undefined One item snapshot.

Pattern: List of Progress Bars (ARIA progressbar) with native action buttons and a polite live region for outcomes.

The Angular component renders the framework-neutral component, so its keyboard support, roles, WCAG 2.2 criteria, budgets, and import cost apply unchanged: see Upload Queue: Accessibility and performance.