Skip to main content
Module

std/mime/mod.ts>MultipartWriter

Deno standard library
Go to Latest
class MultipartWriter
Deprecated
Deprecated

Use FormData instead. See https://doc.deno.land/deno/stable/~/FormData and https://developer.mozilla.org/en-US/docs/Web/API/FormData for more details.

Writer for creating multipart/form-data

import { MultipartWriter } from "https://deno.land/std@0.139.0/mime/mod.ts";

Constructors

new
MultipartWriter(writer: Deno.Writer, boundary?: string)

Properties

private
readonly
_boundary: string
private
bufWriter: BufWriter
private
isClosed: boolean
private
lastPart: PartWriter | undefined
readonly
boundary: string

Methods

private
flush()

Close writer. No additional data can be written to stream

createFormFile(field: string, filename: string): Deno.Writer
writeField(field: string, value: string)
writeFile(
field: string,
filename: string,
)