拆分图片处理

This commit is contained in:
wangchengjun
2022-06-08 14:48:55 +08:00
parent 7c3a919ff6
commit bf25a061bc
@@ -42,6 +42,9 @@ public class SplitFileController {
throw new JeroBootException("文件不存在");
}
int splitIndex = fileUrl.lastIndexOf(File.separator);
if(splitIndex == -1){
splitIndex = fileUrl.lastIndexOf("/");
}
String fileName = fileUrl.substring(splitIndex);
response.setHeader("Content-Disposition",
"attachment; filename=\""+fileName+"\"");