Skip to content

InFile

@tsed/schema

Usage

typescript
import { InFile } from "@tsed/schema";

See /packages/specs/schema/src/types/decorators/operations/inFile.ts.

Overview

ts
function InFile(name: string): ParameterDecorator;

Description

Add a input file parameter.

WARNING

Don't use decorator with Ts.ED application to decorate parameters. Use BodyParams, PathParams, etc... instead. But you can use this decorator on Method, to add extra in parameters like Authorization header.

typescript
@Controller("/")
class MyController {
   @Post("/")
   method(@InFile("file1") file: any) {
   }
 }

Released under the MIT License.