Module

x/abc/vendor/https/deno.land/std/mime/multipart.ts>MultipartWriter

A better Deno framework to create web application.
Go to Latest
class MultipartWriter
import { MultipartWriter } from "https://dotland.deno.dev/x/abc@v1.0.3/vendor/https/deno.land/std/mime/multipart.ts";

Writer for creating multipart/form-data

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
createPart(headers: Headers): Deno.Writer
private
flush(): Promise<void>
close(): Promise<void>

Close writer. No additional data can be written to stream

createFormField(field: string): Deno.Writer
createFormFile(field: string, filename: string): Deno.Writer
writeField(field: string, value: string): Promise<void>
writeFile(
field: string,
filename: string,
file: Deno.Reader,
): Promise<void>