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

x/alosaur/src/deps.ts>MultipartReader

Alosaur - Deno web framework with many decorators
Go to Latest
class MultipartReader
import { MultipartReader } from "https://deno.land/x/alosaur@v0.31.1/src/deps.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.

readForm(options?: ReadFormOptions): Promise<MultipartFormData>

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.