UploadedFile
Route handler parameter decorator. Extracts the file object
and populates the decorated parameter with the value of file.
Used in conjunction with
multer middleware for Express-based applications.
@UploadedFile(fileKey?: string | PipeTransform<any, any> | Type<PipeTransform<any, any>>, ...pipes: (PipeTransform<any, any> | Type<PipeTransform<any, any>>)[])
Parameters
| Option | Type | Description |
|---|---|---|
fileKey
|
string | PipeTransform |
Optional. Default is |
pipes
|
(PipeTransform |
Returns
ParameterDecorator
See also
Description
For example:
uploadFile(@UploadedFile() file) {
console.log(file);
}