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