瀏覽代碼

修改报表目录路径判断

xielq 5 年之前
父節點
當前提交
94b69ca163

+ 4 - 4
src/main/java/com/uas/report/axis/BasicResourceHandler.java

@@ -30,10 +30,10 @@ public class BasicResourceHandler implements ResourceHandler {
 			}
 			// 不支持查看、压缩:jasper文件、tmp路径
 			String filePath = file.getPath();
-			if (filePath.endsWith(".jasper") || filePath.endsWith("tmp") || filePath.contains("\\tmp\\")
-					|| filePath.contains("/tmp/")) {
-				return false;
-			}
+			//if (filePath.endsWith(".jasper") || filePath.endsWith("tmp") || filePath.contains("\\tmp\\")
+			//		|| filePath.contains("/tmp/")) {
+			//	return false;
+			//}
 			return true;
 		}
 	};

+ 4 - 4
src/main/java/com/uas/report/service/impl/FileServiceImpl.java

@@ -75,10 +75,10 @@ public class FileServiceImpl implements FileService {
 			}
 			// 不支持查看、压缩:jasper文件、tmp路径
 			String filePath = file.getPath().toLowerCase();
-			if (filePath.endsWith(".jasper") || filePath.endsWith("tmp") || filePath.contains("\\tmp\\")
-					|| filePath.contains("/tmp/")) {
-				return false;
-			}
+			//if (filePath.endsWith(".jasper") || filePath.endsWith("tmp") || filePath.contains("\\tmp\\")
+			//		|| filePath.contains("/tmp/")) {
+			//	return false;
+			//}
 			return true;
 		}
 	};