Skip to main content
Module

x/dext/deps/mod.ts>oak.FormDataReadOptions

The Preact Framework for Deno
Latest
interface oak.FormDataReadOptions
import { type oak } from "https://deno.land/x/dext@0.10.5/deps/mod.ts";
const { FormDataReadOptions } = oak;

Properties

optional
bufferSize: number

The size of the buffer to read from the request body at a single time. This defaults to 1mb.

optional
maxFileSize: number

The maximum file size that can be handled. This defaults to 10MB when not specified. This is to try to avoid DOS attacks where someone would continue to try to send a "file" continuously until a host limit was reached crashing the server or the host.

optional
maxSize: number

The maximum size of a file to hold in memory, and not write to disk. This defaults to 0, so that all multipart form files are written to disk. When set to a positive integer, if the form data file is smaller, it will be retained in memory and available in the .content property of the FormDataFile object. If the file exceeds the maxSize it will be written to disk and the filename file will contain the full path to the output file.

optional
outPath: string

When writing form data files to disk, the output path. This will default to a temporary path generated by Deno.makeTempDir().

optional
prefix: string

When a form data file is written to disk, it will be generated with a random filename and have an extension based off the content type for the file. prefix can be specified though to prepend to the file name.