PRO

Effect Chunked Upload Integrity

Resumable chunked upload with per-chunk and whole-object checksums. Sending a large file as one stream lets a single flipped byte produce a silently wrong object the server stores as fine; per-chunk checksums catch corruption at the boundary and reject that chunk for re-send instead of poisoning the whole upload. Tracking which chunks are verified lets a connection lost at 95% resume by sending only the missing ones, and a final whole-object digest proves the reassembled file matches what the client meant to send. Accepting a chunk recomputes and compares its checksum in one Ref.modify, so a re-sent chunk is idempotent and a corrupt one is a typed ChecksumMismatch. The demo rejects a corrupt chunk, resumes after a drop, and refuses a whole-object mismatch. Pinned to effect 4.0.0-beta.98.

Install
npx shadcn@latest add https://ui.aryank.space/r/effect-chunked-upload-integrity.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
transfer
upload 100MB
ReadableStream<Uint8Array>
PUT wholeFile // one flipped byte, silent corruption

Sending a large file as one stream lets a single flipped byte produce a silently wrong object the server stores as fine, and a connection lost at 95% throws away all the good work.

Files

Dependencies