|
|
@@ -90,7 +90,7 @@ public class MinIoTemplate { |
|
|
|
* @return OssFile |
|
|
|
*/ |
|
|
|
public OssFile putObject(MultipartFile file, String bucketName, String originalFileName, boolean deduplication, String busCode) { |
|
|
|
List<String> allowedExtensions = List.of("jpg", "jpeg", "png", "gif", "doc", "docx", "pdf", "csv", "xls", "xlsx"); |
|
|
|
List<String> allowedExtensions = List.of("jpg", "jpeg", "png", "gif", "doc", "docx", "pdf", "csv", "xls", "xlsx", "zip", "apk"); |
|
|
|
String fileExtension = originalFileName.substring(originalFileName.lastIndexOf(".") + 1); |
|
|
|
if (!allowedExtensions.contains(fileExtension)) { |
|
|
|
throw new GlobalException("文件类型错误"); |