| | |
| | | filePath = filePath + "/show/" + file.getOriginalFilename().split("\\.", 2)[0]; |
| | | // 上传并返回新文件名称 |
| | | String fileName = FileUploadUtils.uploadSort(filePath, file); |
| | | //将word转成html |
| | | convertDocToHtml(filePath + "\\" + file.getOriginalFilename(), filePath + "\\" + file.getOriginalFilename().split("\\.", 2)[0] + ".html"); |
| | | // 将word转成html(源文件以磁盘实际保存路径为准,保持分隔符一致,避免"/"和"\"混用导致找不到文件) |
| | | String docFilePath = RuoYiConfig.getProfile() + fileName.replace(Constants.RESOURCE_PREFIX, ""); |
| | | String htmlFilePath = docFilePath.replaceAll("\\.[^.]*$", ".html"); |
| | | convertDocToHtml(docFilePath, htmlFilePath); |
| | | |
| | | String url = null; |
| | | SysConfig config = new SysConfig(); |