|
@@ -113,11 +113,11 @@ public class BoxModelServiceImpl implements IBoxModelService {
|
|
|
//上传原始obj相关文件
|
|
|
String objPath = String.format(UploadFilePath.USER_EDIT_PATH, num) + "boxModels/" + sid + "/";
|
|
|
//先删除旧的,只需要保留最新的
|
|
|
- fYunFileService.deleteFolder(objPath);
|
|
|
+ ossUtil.deleteObject(scenePlusExt.getYunFileBucket(), objPath);
|
|
|
List<File> files = FileUtil.loopFiles(srcPath);
|
|
|
files.stream().forEach(v->{
|
|
|
String ossKey = String.format(UploadFilePath.USER_EDIT_PATH, num) + "boxModels/" + sid + "/" + v.getAbsolutePath().replace(srcPath, "");
|
|
|
- fYunFileService.uploadFile(v.getAbsolutePath(), ossKey);
|
|
|
+ ossUtil.uploadFile(scenePlusExt.getYunFileBucket(), ossKey, v.getAbsolutePath(), false);
|
|
|
});
|
|
|
|
|
|
return ResultData.ok(sid + ".glb");
|
|
@@ -176,9 +176,9 @@ public class BoxModelServiceImpl implements IBoxModelService {
|
|
|
|
|
|
//删除oss文件
|
|
|
String glbKey = String.format(UploadFilePath.USER_EDIT_PATH, param.getNum()) + "boxModels/" + param.getSid() + ".glb";
|
|
|
- fYunFileService.deleteFile(glbKey);
|
|
|
+ ossUtil.deleteObject(scenePlusExt.getYunFileBucket(), glbKey);
|
|
|
String modelPath = String.format(UploadFilePath.USER_EDIT_PATH, param.getNum()) + "boxModels/" + param.getSid();
|
|
|
- fYunFileService.deleteFolder(modelPath);
|
|
|
+ ossUtil.deleteObject(scenePlusExt.getYunFileBucket(), modelPath);
|
|
|
|
|
|
return ResultData.ok();
|
|
|
}
|