diff --git a/.gitignore b/.gitignore index 118cdeb..9caffb9 100644 --- a/.gitignore +++ b/.gitignore @@ -73,6 +73,6 @@ out # temp data __data # 我想把upload文件夹传上去 -/upload/* -!/upload/.gitkeep +/public/upload/* +!/public/upload/.gitkeep types/env.d.ts \ No newline at end of file diff --git a/public/upload/test.txt b/public/upload/test.txt deleted file mode 100644 index e69de29..0000000 diff --git a/src/modules/tools/upload/upload.dto.ts b/src/modules/tools/upload/upload.dto.ts index e25dcdd..05f25b0 100644 --- a/src/modules/tools/upload/upload.dto.ts +++ b/src/modules/tools/upload/upload.dto.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; }