interface UploadedFile
Since 0.1.0

A single parsed file from a multipart upload.

Properties

readonly
name: string

The form field name the file was uploaded under (Content-Disposition name="…").

readonly
filename: string

The client-provided original file name (Content-Disposition filename="…"). Always present: since M94b a part carrying NO filename under the field name is a plain form value, not an upload (an empty filename="" — an empty file input — still is one).

readonly
data: Uint8Array

File bytes.

readonly
mimeType: string

MIME type reported by the client.

readonly
size: number

File size in bytes.

Usage

import { type UploadedFile } from "storage-plugin/src/index.ts";