Commit 63fa263c authored by 董天德's avatar 董天德

Merge remote-tracking branch 'origin/dev_20230209_xuhd'

parents 1f15439d 733e21d1
......@@ -102,6 +102,12 @@
<version>0.0.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.hungraim.ltc</groupId>
<artifactId>account-api</artifactId>
<version>0.0.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
......
......@@ -44,7 +44,7 @@ public class FileUploadController {
String fileType = originalFilename.substring(file.getOriginalFilename().lastIndexOf("."));
List<String> fileTypes = fileUploadConfig.getType();
log.info("支持图片类型:" + fileTypes+",上传的图片类型:"+fileType);
if(!fileTypes.contains(fileType)){
if(!fileTypes.stream().anyMatch(e->e.equalsIgnoreCase(fileType))){
log.info("上传文件错误");
return Result.failed(ResultCode.FILE_TYPE_ERROR);
}
......
......@@ -36,9 +36,19 @@ file:
upload:
path: E:/workspace/upload
type:
- .JPG
- .JPEG
- .png
- .gif
- .jpg
- .jpeg
- .png
- .PNG
- .bmp
- .zip
- .rar
- .7z
- .gz
- .doc
- .docx
- .xls
- .xlsx
- .pdf
- .txt
- .csv
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment