Defines the built-in ParseFile Pipe. This pipe can be used to validate incoming files
with @UploadedFile()
decorator. You can use either other specific built-in validators
or provide one of your own, simply implementing it through FileValidator interface
and adding it to ParseFilePipe's constructor.
class ParseFilePipe implements PipeTransform {
protected exceptionFactory: (error: string) => any
transform(value: any): Promise<any>
protected validate(file: any): Promise<any>
getValidators()
}
Properties
Property |
Description |
protected exceptionFactory: (error: string) => any
|
|
Methods
|
transform(value: any): Promise<any>
Parameters
Option |
Type |
Description |
value
|
any |
|
Returns
Promise<any>
|
validate()
|
protected validate(file: any): Promise<any>
Parameters
Option |
Type |
Description |
file
|
any |
|
Returns
Promise<any>
|
getValidators()
|
getValidators()
Parameters
There are no parameters.
|