Components
← All components

Direct Upload Progress

stimeo--direct-upload

Renders per-file ActiveStorage Direct Upload progress with aria + status announcements.

  • Rails / Turbo

The stimeo--direct-upload controller subscribes to the ActiveStorage direct-upload:* events (initialize / progress / error / end, which bubble to document) and renders a per-file progress row cloned from the row template. It updates aria-valuenow / aria-valuetext, the [data-field="percent"] text, and the --stimeo-upload-progress custom property, flips data-upload-state to done / error, and reflects the aggregate on data-upload-progress. Completion and failure are announced into the optional status live region using the consumer-provided doneLabel / errorLabel (with %{name} substituted), while per-tick progress is conveyed by the progressbar's aria-valuenow to avoid flooding. Behavior only — no bars are drawn, and the upload itself stays with @rails/activestorage. Listeners are removed on disconnect.

running