|
@@ -343,13 +343,16 @@ public class SceneEvidenceServiceImpl extends ServiceImpl<ISceneEvidenceMapper,
|
|
|
if (CollUtil.isNotEmpty(medias)) {
|
|
|
medias.stream().forEach(m -> {
|
|
|
JSONObject media = (JSONObject) m;
|
|
|
- String path = media.getString("path");
|
|
|
+ String sid = media.getString("sid");
|
|
|
+ String path = media.getString("src");
|
|
|
String fileName = FileUtil.getName(path);
|
|
|
- String newFileName = UUID.randomUUID() + "." + FileUtil.extName(fileName);
|
|
|
+ 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/", "");
|
|
|
+ }
|
|
|
fYunFileServiceInterface.copyFileInBucket(path, meshKey);
|
|
|
media.put("src", newFileName);
|
|
|
- media.remove("path");
|
|
|
});
|
|
|
}
|
|
|
return data;
|