Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
class MultipartReader
import { MultipartReader } from "https://deno.land/std@0.94.0/mime/multipart.ts";

Reader for parsing multipart/form-data

Constructors

new
MultipartReader(reader: Deno.Reader, boundary: string)

Properties

private
currentPart: PartReader | undefined
private
partsRead: number
readonly
bufReader: BufReader
readonly
dashBoundary: Uint8Array
readonly
dashBoundaryDash: Uint8Array
readonly
newLine: Uint8Array
readonly
newLineDashBoundary: Uint8Array

Methods

private
isBoundaryDelimiterLine(line: Uint8Array): boolean
private
isFinalBoundary(line: Uint8Array): boolean
private
nextPart(): Promise<PartReader | null>
readForm(maxMemory?): Promise<MultipartFormData>

Read all form data from stream. If total size of stored data in memory exceed maxMemory, overflowed file data will be written to temporal files. String field values are never written to files. null value means parsing or writing to file was failed in some reason.