BunMultipart.ts
BunMultipart.ts overview
Section titled “BunMultipart.ts overview”Bun-specific helpers for parsing HTTP multipart/form-data request bodies.
This module adapts a Bun Request body and headers into the shared
Multipart model. stream returns multipart parts as a Stream, while
persisted collects the form and writes file parts to scoped temporary files
through the current FileSystem, Path, and Scope services.
Since v4.0.0
Exports Grouped by Category
Section titled “Exports Grouped by Category”constructors
Section titled “constructors”persisted
Section titled “persisted”Parses and persists multipart data from a Bun Request, requiring file-system, path, and scope services.
Signature
declare const persisted: ( source: Request) => Effect.Effect<Multipart.Persisted, Multipart.MultipartError, FileSystem | Path | Scope.Scope>Since v4.0.0
stream
Section titled “stream”Parses a Bun Request body as multipart data and returns a stream of multipart parts.
Signature
declare const stream: (source: Request) => Stream.Stream<Multipart.Part, Multipart.MultipartError>Since v4.0.0