Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/std/mime/mod.ts>MultipartReader

A modern runtime for JavaScript and TypeScript.
Go to Latest
class MultipartReader
import { MultipartReader } from "https://deno.land/x/deno@v0.28.0/std/mime/mod.ts";

Reader for parsing multipart/form-data

Constructors

new
MultipartReader(reader: Reader, boundary: string)

Properties

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

Methods

private
isBoundaryDelimiterLine(line: Uint8Array): boolean
private
isFinalBoundary(line: Uint8Array): boolean
private
nextPart(): Promise<PartReader | Deno.EOF>
readForm(maxMemory: number): Promise<{ [key: string]: string | FormFile; }>

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