|
|
@ -52,7 +52,7 @@ public class UploadInformationDomainServiceImpl implements UploadInformationDoma |
|
|
@Autowired |
|
|
@Autowired |
|
|
private AlgorithmApplicationService algorithmApplicationService; |
|
|
private AlgorithmApplicationService algorithmApplicationService; |
|
|
|
|
|
|
|
|
private static final long MAX_SIZE = 50 * 1024 * 1024; // 50MB 限制
|
|
|
private static final long MAX_SIZE = 100 * 1024 * 1024; // 100MB 限制
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public Result<String> checkDuplicates(Long subLineId, List<FileCheckItem> files) throws Exception { |
|
|
public Result<String> checkDuplicates(Long subLineId, List<FileCheckItem> files) throws Exception { |
|
|
@ -74,7 +74,7 @@ public class UploadInformationDomainServiceImpl implements UploadInformationDoma |
|
|
if (CollUtil.isNotEmpty(overSizeList)) { |
|
|
if (CollUtil.isNotEmpty(overSizeList)) { |
|
|
// 发现超大文件,直接中断,不查数据库
|
|
|
// 发现超大文件,直接中断,不查数据库
|
|
|
throw new BusinessErrorException(String.format( |
|
|
throw new BusinessErrorException(String.format( |
|
|
"以下文件超过50MB限制,禁止上传:【%s】", |
|
|
"以下文件超过100MB限制,禁止上传:【%s】", |
|
|
String.join("、", overSizeList))); |
|
|
String.join("、", overSizeList))); |
|
|
} |
|
|
} |
|
|
List<String> fileNames = files.stream().map(FileCheckItem::getName).toList(); |
|
|
List<String> fileNames = files.stream().map(FileCheckItem::getName).toList(); |
|
|
|