fix(admin-service): 增加 multer fileSize 限制 500MB,支持 APK/IPA 上传
FileInterceptor upload/parse 均未设置文件大小限制,可能导致 multer 默认 内存保护触发。与 Nginx client_max_body_size 500m 保持一致。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
0f07698262
commit
6bdd8d1e19
|
|
@ -83,7 +83,7 @@ export class AdminVersionController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Post('upload')
|
@Post('upload')
|
||||||
@UseInterceptors(FileInterceptor('file'))
|
@UseInterceptors(FileInterceptor('file', { limits: { fileSize: 500 * 1024 * 1024 } }))
|
||||||
@ApiConsumes('multipart/form-data')
|
@ApiConsumes('multipart/form-data')
|
||||||
@ApiOperation({ summary: 'Upload APK/IPA and create version' })
|
@ApiOperation({ summary: 'Upload APK/IPA and create version' })
|
||||||
async uploadVersion(
|
async uploadVersion(
|
||||||
|
|
@ -148,7 +148,7 @@ export class AdminVersionController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Post('parse')
|
@Post('parse')
|
||||||
@UseInterceptors(FileInterceptor('file'))
|
@UseInterceptors(FileInterceptor('file', { limits: { fileSize: 500 * 1024 * 1024 } }))
|
||||||
@ApiConsumes('multipart/form-data')
|
@ApiConsumes('multipart/form-data')
|
||||||
@ApiOperation({ summary: 'Parse APK/IPA without saving (preview metadata)' })
|
@ApiOperation({ summary: 'Parse APK/IPA without saving (preview metadata)' })
|
||||||
async parsePackage(@UploadedFile() file: Express.Multer.File) {
|
async parsePackage(@UploadedFile() file: Express.Multer.File) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue