Go to Latest
class MultipartReader
import { MultipartReader } from "https://dotland.deno.dev/std@0.116.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?: number): 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.

Read all form data from stream. If total size of stored data in memory exceed options.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.

readForm(maxMemoryOrOptions?: number | ReadFormOptions): Promise<MultipartFormData>