PRO

Effect Multipart Upload with Abort Scope

A multipart object upload where cleanup is a property of the scope, not a finally the caller must remember: initiate is the acquire, and the release aborts the upload on every exit path (failure, defect, interrupt) unless complete() landed, so a crash mid-transfer can never leave orphaned parts billing invisibly in storage. Parts upload in parallel under bounded concurrency with per-part retry, so one flaky part re-uploads alone, and a resumed session reads the store's acknowledged part list and uploads only the gap. Solves the restart-from-zero upload and the orphaned parts that bill forever. Pinned to effect 4.0.0-beta.98.

Install
npx shadcn@latest add https://ui.aryank.space/r/effect-multipart-upload-resume.json

Installs from ui.aryank.space. To add it by hand, copy the files in Files below, or register the @compronents namespace via the docs.

Visualization
outcome
backup.tar (8 parts)
Effect<string>
FINALIZERS
Effect.acquireRelease(initiate, abortUnlessDone) // cleanup is the scope's job

Initiate is the acquire and abort is its release. Parts upload in parallel with per-part retry, complete() assembles the ETags, and the abort finalizer sees the completed flag and skips itself. The scope closes clean: object stored, no leftovers.

Files

Dependencies