|
@@ -89,6 +89,8 @@ public class FileBlobController {
|
|
|
if (file != null) {
|
|
|
String[] suffix = file.getFileNm().split("\\.");
|
|
|
String fileType = suffix[suffix.length - 1];
|
|
|
+ String fileName = System.currentTimeMillis() + "." + suffix[suffix.length - 1];
|
|
|
+ response.setHeader("Content-Disposition", "attachment; filename=" + fileName);
|
|
|
if ("jpg,jepg,jpeg,gif,png".contains(fileType)) {//图片类型
|
|
|
response.setContentType("image/" + fileType);
|
|
|
} else if ("pdf".contains(fileType)) {//pdf类型
|
|
@@ -99,8 +101,6 @@ public class FileBlobController {
|
|
|
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
|
|
} else {//自动判断下载文件类型
|
|
|
response.setContentType("application/octet-stream");
|
|
|
- String fileName = System.currentTimeMillis() + "." + suffix[suffix.length - 1];
|
|
|
- response.setHeader("Content-Disposition", "attachment; filename=" + fileName);
|
|
|
}
|
|
|
buff = file.getFile();
|
|
|
} else {
|
|
@@ -199,7 +199,6 @@ public class FileBlobController {
|
|
|
FirstArticleTitleBlob testEntry2 = FirstArticleTitleBlob.builder().bentelerPlanId(Long.parseLong("38"))//设置机会id
|
|
|
.titleContent(baos.toByteArray()).build();
|
|
|
blobService2.save(testEntry2);
|
|
|
- System.out.println("11111111111111111111111111111111111111111");
|
|
|
}
|
|
|
|
|
|
// @GetMapping("/getIniPlan")
|