|
|
@@ -54,6 +54,10 @@ public class UploadController {
|
|
|
if (isPicture(fileName)) {
|
|
|
stringBuilder.append("Picture").append(File.separator);
|
|
|
}
|
|
|
+ // 上传报表模板
|
|
|
+ if (isReportTemplate(fileName)) {
|
|
|
+ stringBuilder.append("jrxml").append(File.separator);
|
|
|
+ }
|
|
|
stringBuilder.append(fileName);
|
|
|
String targetFilePath = stringBuilder.toString();
|
|
|
File targetFile = new File(targetFilePath);
|
|
|
@@ -90,4 +94,20 @@ public class UploadController {
|
|
|
String fileType = fileName.substring(fileName.lastIndexOf(".") + 1).toLowerCase();
|
|
|
return pictureTypes.contains(fileType);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 判断是否为jrxml报表模板文件
|
|
|
+ *
|
|
|
+ * @param fileName
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ private boolean isReportTemplate(String fileName) {
|
|
|
+ if (StringUtils.isEmpty(fileName)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (fileName.endsWith("jrxml")) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|