|
@@ -99,7 +99,8 @@ public class BasePolicyController extends BaseController {
|
|
|
String filePath = PurchaseConfig.getUploadPath();
|
|
|
// 上传并返回新文件名称
|
|
|
String upload = FileUploadUtils.upload(filePath, file);
|
|
|
- FileUtils.uploadESFile(upload, esId);
|
|
|
+ String filePathStr = filePath + upload.substring("/profile/upload".length(),upload.length());
|
|
|
+ FileUtils.uploadESFile(filePathStr, esId);
|
|
|
AjaxResult ajax = AjaxResult.success();
|
|
|
String url = serverConfig.getUrl() + upload;
|
|
|
ajax.put("url", url);
|
|
@@ -164,4 +165,12 @@ public class BasePolicyController extends BaseController {
|
|
|
return success(basePolicyService.getById(id));
|
|
|
}
|
|
|
|
|
|
+ public static void main(String[] args) {
|
|
|
+ String filePath ="/home/purchase/uploadPath/upload";
|
|
|
+
|
|
|
+ String upload = "/profile/upload/2023/02/14/bookinfo应用_20230214124044A001.pdf";
|
|
|
+ String filePathStr = filePath + upload.substring("/profile/upload".length(),upload.length());
|
|
|
+ System.out.println(filePathStr);
|
|
|
+ System.out.println(upload.indexOf("/profile/upload"));
|
|
|
+ }
|
|
|
}
|