头像显示问题
This commit is contained in:
@@ -207,7 +207,7 @@ public class FileStorageUtil {
|
||||
} catch (Exception exception) {
|
||||
throw new BusinessException(OssResponseEnum.DOWNLOAD_FILE_STREAM_ERROR);
|
||||
}
|
||||
String fileType = filePath.substring(filePath.lastIndexOf('.')).toLowerCase();
|
||||
String fileType = filePath.substring(filePath.lastIndexOf('.')+1).toLowerCase();
|
||||
switch (fileType) {
|
||||
case "jpg":
|
||||
case "jpeg":
|
||||
@@ -221,7 +221,7 @@ public class FileStorageUtil {
|
||||
break;
|
||||
default:
|
||||
response.setContentType("application/octet-stream;charset=UTF-8");
|
||||
response.setHeader("Content-Disposition", "inline;attachment;filename=" + filePath);
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + filePath);
|
||||
break;
|
||||
}
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user