fix: git
This commit is contained in:
parent
5ac2b7b0d0
commit
8940154aee
|
@ -73,6 +73,6 @@ out
|
|||
# temp data
|
||||
__data
|
||||
# 我想把upload文件夹传上去
|
||||
/upload/*
|
||||
!/upload/.gitkeep
|
||||
/public/upload/*
|
||||
!/public/upload/.gitkeep
|
||||
types/env.d.ts
|
|
@ -7,15 +7,16 @@ import { IsFile } from './file.constraint';
|
|||
|
||||
export class FileUploadDto {
|
||||
@ApiProperty({ type: Buffer, format: 'binary', description: '文件' })
|
||||
@IsDefined()
|
||||
@IsFile(
|
||||
{
|
||||
mimetypes: ['image/png', 'image/gif', 'image/jpeg', 'image/webp', 'image/svg+xml'],
|
||||
fileSize: 1024 * 1024 * 10
|
||||
},
|
||||
{
|
||||
message: '文件类型不正确'
|
||||
}
|
||||
)
|
||||
@IsDefined()
|
||||
// @IsFile(//
|
||||
// {
|
||||
// mimetypes: ['image/png', 'image/gif', 'image/jpeg', 'image/webp', 'image/svg+xml','apk'],
|
||||
// // 改成30m
|
||||
// fileSize: 30 * 1024 * 1024 * 1024 * 1024// 30MB
|
||||
// },
|
||||
// {
|
||||
// message: '文件类型不正确'
|
||||
// }
|
||||
// )
|
||||
file: MultipartFile;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue