fix: 修复预览功能
报表上传以后目前可以正常预览
This commit is contained in:
@@ -21,7 +21,7 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
|||||||
@Override
|
@Override
|
||||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||||
// /home/file/**为前端URL访问路径 后面 file:xxxx为本地磁盘映射
|
// /home/file/**为前端URL访问路径 后面 file:xxxx为本地磁盘映射
|
||||||
registry.addResourceHandler(picPath+"**").addResourceLocations("file://"+uploadFile);
|
registry.addResourceHandler(picPath + "**").addResourceLocations("file:" + uploadFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,8 +67,6 @@ uploadFile=D:\\uploadfile\\tmp\\
|
|||||||
#uploadFile=/data/DeploymentPackage/report_library/uploadfile/
|
#uploadFile=/data/DeploymentPackage/report_library/uploadfile/
|
||||||
# \u672C\u5730\u6587\u4EF6\u8BBF\u95EE\u7684url\u5730\u5740
|
# \u672C\u5730\u6587\u4EF6\u8BBF\u95EE\u7684url\u5730\u5740
|
||||||
picPath=/api/home/pic/
|
picPath=/api/home/pic/
|
||||||
#picPath=D:\\uploadfile\\tmp\\pic\\
|
|
||||||
|
|
||||||
|
|
||||||
serverIp=http://127.0.0.1:7060/
|
serverIp=http://127.0.0.1:7060/
|
||||||
|
|
||||||
|
|||||||
@@ -69,12 +69,8 @@ public class PdfUtil {
|
|||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
}
|
}
|
||||||
|
|
||||||
//判断是否是服务器环境
|
list.add(ipAddress + "api/home/pic" + "/" + fileName + "/" + i + ".png");
|
||||||
if ("local".equals(uploadType)) {
|
|
||||||
list.add(targetPath + fileName + "/" + i + ".png");
|
|
||||||
} else {
|
|
||||||
list.add(ipAddress + "api/home/pic" + "/" + fileName + "/" + i + ".png");
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user