Skip to content

tsoa-next / @tsoa-next/runtime / File

Interface: File

Defined in: packages/runtime/src/interfaces/file.ts:4

Object containing file metadata and access information.

Properties

buffer

ts
buffer: Buffer;

Defined in: packages/runtime/src/interfaces/file.ts:31

MemoryStorage only: A Buffer containing the entire file.


destination

ts
destination: string;

Defined in: packages/runtime/src/interfaces/file.ts:25

DiskStorage only: Directory to which this file has been uploaded.


encoding

ts
encoding: string;

Defined in: packages/runtime/src/interfaces/file.ts:14

Value of the Content-Transfer-Encoding header for this file.

Deprecated

since July 2015

See

RFC 7578, Section 4.7


fieldname

ts
fieldname: string;

Defined in: packages/runtime/src/interfaces/file.ts:6

Name of the form field associated with this file.


filename

ts
filename: string;

Defined in: packages/runtime/src/interfaces/file.ts:27

DiskStorage only: Name of this file within destination.


mimetype

ts
mimetype: string;

Defined in: packages/runtime/src/interfaces/file.ts:16

Value of the Content-Type header for this file.


originalname

ts
originalname: string;

Defined in: packages/runtime/src/interfaces/file.ts:8

Name of the file on the uploader's computer.


path

ts
path: string;

Defined in: packages/runtime/src/interfaces/file.ts:29

DiskStorage only: Full path to the uploaded file.


size

ts
size: number;

Defined in: packages/runtime/src/interfaces/file.ts:18

Size of the file in bytes.


stream

ts
stream: Readable;

Defined in: packages/runtime/src/interfaces/file.ts:23

A readable stream of this file. Only available to the _handleFile callback for custom StorageEngines.

TypeScript-first OpenAPI generation, route generation, and runtime validation.