|
|
@@ -7,6 +7,7 @@ import cn.hutool.core.date.TimeInterval;
|
|
|
import cn.hutool.core.io.FileUtil;
|
|
|
import cn.hutool.core.net.multipart.UploadFile;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import cn.hutool.http.HttpUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONException;
|
|
|
@@ -505,10 +506,15 @@ public class SceneEvidenceServiceImpl extends ServiceImpl<ISceneEvidenceMapper,
|
|
|
String fileName = FileUtil.getName(path);
|
|
|
String newFileName = sid + "." + FileUtil.extName(fileName);
|
|
|
String meshKey = String.format(UploadFilePath.USER_EDIT_PATH, param.getNum()) + newFileName;
|
|
|
- if(path.startsWith("/oss/")){
|
|
|
- path = path.replace("/oss/", "");
|
|
|
+ if(path.startsWith("http")){
|
|
|
+ HttpUtil.downloadFile(path, new File("/oss/4dkankan/"+meshKey), 600000);
|
|
|
+ }else{
|
|
|
+ if(path.startsWith("/oss/")){
|
|
|
+ path = path.replace("/oss/", "");
|
|
|
+ }
|
|
|
+ fYunFileServiceInterface.copyFileInBucket(path, meshKey);
|
|
|
}
|
|
|
- fYunFileServiceInterface.copyFileInBucket(path, meshKey);
|
|
|
+
|
|
|
media.put("src", newFileName);
|
|
|
importMap.put(sid, mid);
|
|
|
});
|