|
@@ -110,7 +110,8 @@ public class DataController extends BaseController {
|
|
|
String profile = TaaisConfig.getProfile();
|
|
|
// 拷贝文件到临时目录
|
|
|
for (DataVo dataVo : list) {
|
|
|
- File srcFile = new File(profile + dataVo.getUrl());
|
|
|
+ String[] split = dataVo.getUrl().split("/profile");
|
|
|
+ File srcFile = new File(profile + split[1]);
|
|
|
File destFile = new File(tempDir, srcFile.getName());
|
|
|
try {
|
|
|
if (srcFile.exists()) {
|
|
@@ -119,7 +120,8 @@ public class DataController extends BaseController {
|
|
|
log.error("图片源文件不存在:{}", srcFile.getName());
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(dataVo.getLabelurl())) {
|
|
|
- File labelurlFile = new File(profile + dataVo.getLabelurl());
|
|
|
+ String[] labels = dataVo.getUrl().split("/profile");
|
|
|
+ File labelurlFile = new File(profile + labels[1]);
|
|
|
File labelurlDestFile = new File(tempDir, labelurlFile.getName());
|
|
|
if (labelurlFile.exists()) {
|
|
|
FileUtils.copyFile(labelurlFile, labelurlDestFile);
|