Upload Queue

Files on their way: progress, time left, pause, cancel, retry and remove, with a transfer service that does the sending.

Re: Export fails on files over 2 GB

Thanks, Dana. I've attached the server log and a capture of the failing request so engineering can reproduce it.

0 of 3 uploaded

0 of 3 uploaded · 0 bytes of 6.4 MB

  • export-worker-2026-12-01.log

    Uploading, 0%. 0 bytes of 410 KB

  • export-request.har

    Uploading, 0%. 0 bytes of 6 MB

  • Export error.svg

    Uploading, 0%. 0 bytes of 835 bytes

Drop files here or chooseChoose files

Up to 25 MB

Sending waits for the uploads.

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/upload-queue

Usage

import type { UploadItem } from "./ui/uicontext/components/domain/Upload.ts"import { UploadQueue } from "./ui/uicontext/components/upload/UploadQueue.ts"
const Message = UiSchema.TaggedEnum({	RequestedFileChange: { id: Schema.String, action: Schema.Literals(["cancel", "retry", "remove"]) },})// `files` comes from your transfer: each file's bytes sent and its Outcome (Pending, Accepted, Refused)export const Attachments = (h: Html.H<typeof Message.Type>, files: ReadonlyArray<UploadItem>) =>	UploadQueue(h, {		props: { label: "Attachments", files },		onEmit: {			RequestedCancel: ({ id }) => Message.RequestedFileChange({ id, action: "cancel" }),			RequestedRetry: ({ id }) => Message.RequestedFileChange({ id, action: "retry" }),			RequestedRemove: ({ id }) => Message.RequestedFileChange({ id, action: "remove" }),			RequestedPause: () => undefined,			RequestedResume: () => undefined,			RequestedClearDone: () => undefined,		},	})

Examples

Every state

Waiting its turn, sending with the time left, paused, done, and failed with the reason. The app passes each file's bytes sent and Outcome; the queue draws them.

1 of 5 uploaded, 1 failed

1 of 5 uploaded · 907 MB of 2.3 GB · 1 failed

  • Q4 board deck — FINAL (approved by legal) v12.pdfUploaded

    18 MB

  • site-walkthrough.mov

    Uploading, 38%. 774 MB of 2 GB · 3 min left

  • customer-interviews.zip

    Paused · 114 MB of 326 MB

  • pricing-model.xlsx

    The server stopped answering. Try again.

  • notes.md

    Waiting · 0 bytes

API reference

UploadQueueComponent

Props

UploadQueue props
NameTypeDescription
labelrequiredstringWhat's being uploaded, as the list's name: "Receipts"
filesrequiredUploadItem[]Every file with its progress and Outcome; the app keeps the list
pausablebooleanThe transfer can go on from where it stopped: offer Pause
hideSummarybooleanHide the line over the list; for one or two files in a form
localestring—

Events

UploadQueue events
EventPayloadDescription
RequestedPause{ id: string }Stop sending the file, keeping what's sent so the app can go on later
RequestedResume{ id: string }Go on with a paused file
RequestedCancel{ id: string }Stop the file and drop it
RequestedRetry{ id: string }Send a failed file again
RequestedRemove{ id: string }Take a finished or failed file off the list
RequestedClearDone{}Take every finished file off the list

UploadsView function

Options

Uploads options
NameTypeDefaultDescription
concurrencynumber3How many files go at once; 3 by default
initialUploadItem[]—Files already on the list when the page opens: earlier uploads, or a failed one to retry
idPrefixstring"upload"The prefix of the ids new files get; "upload" by default

Source