我想要设置文件的最大文件上传大小,并使其成为可选的上传文件.如果有文件上传,那么它的最大大小不能超过,如果没有文件上传,那么它不能在服务器上请求文件,也不能抛出任何错误.
@Post("fileUpload")
@UseInterceptors(FileInterceptor("file"))
private async fileUpload(
@UploadedFile()
file,
@Body() body
) {
console.log(file);
}