OGE logoOGE

Upload

A file uploader that is useful before it touches the network. With no uploadUrl it is a picker: drag & drop (folders and pasted screenshots included), restrictions that stay on the row with their reason, image previews, and everything chosen exposed through [(value)] as plain File objects. Add a URL and the same element uploads — through a pluggable adapter, chunked and resumable on request.

XHR, not fetch: xhr.upload.onprogress is the only browser API that reports request-body progress, which is why every reference library uses it too. Apps whose auth lives in an interceptor can swap in createHttpClientUploadAdapter in one line.

There is no WAI-ARIA APG pattern for file upload, so the accessibility contract is assembled from primitives and written down: the real <input type="file"> stays in the accessibility tree, the drop zone is a button (so the keyboard reaches the same dialog and nothing nests inside an interactive element), the list is a list with a roving tab stop, Delete removes the focused row, and every change is announced politely. Full API reference →

The demos below run against an in-browser FakeUploadServer, not the network. This site is a static deploy, so a real POST /api/upload would be answered by the SPA rewrite with a 200 — a demo on the real transport would appear to succeed while doing nothing.

drag & drop chunked resumable forms

Getting started

No uploadUrl, so nothing is sent: this is a picker with restrictions and previews. Drop files on the zone, paste a screenshot, or press Enter to browse.

[(value)] accept maxFileSize

No files selected

0 file(s) ready

Uploading

uploadMode='useButtons' waits for the Upload button. Each row grows the affordances its state needs — progress, cancel, then retry. The request log shows exactly what would go over the wire.

uploadMode progress cancel retry

No files selected

(no requests yet)

Chunked and resumable

One request per slice, carrying Kendo-shaped metadata. The scripted server fails chunk 2 once, so auto-retry is visible; Pause and Resume appear only here, because a whole-file request has nothing to suspend.

chunk pause resume auto retry

No files selected

(no requests yet)

Restrictions

A rejected file stays on the list with its reason next to it. It remains in value — hiding it would let a required field pass while a file is plainly on screen — and the bound control is what goes invalid.

allowedFileExtensions maxTotalFileSize validateFile

No files selected

Previews

Image rows render a thumbnail from an object URL the component owns and revokes on remove, clear and destroy.

listType previewWidth

No files selected

External drop zone

The drop surface is often a panel with nothing to do with the uploader's own markup — a different element, which no mode value can express.

ogeUploadDropZone ogeUploadTrigger
Drop files anywhere in this panel

No files selected

Angular forms

Reactive forms, Signal Forms and plain [(value)] all bind the same component. The restrictions reach the control as a plain ValidatorFn, so nothing is restated.

formControl validator required

No files selected

valid: false

Templates

Six slots replace any part of the rendering. The row context arrives pre-formatted, so a custom row needs no size formatter of its own.

ogeUploadFileTemplate

No files selected