|
@@ -116,6 +116,9 @@ public class BoxModelServiceImpl implements IBoxModelService {
|
|
fYunFileService.uploadFile(bucket, glbPath, String.format(UploadFilePath.USER_EDIT_PATH, num) + "boxModels/" + sid + ".glb");
|
|
fYunFileService.uploadFile(bucket, glbPath, String.format(UploadFilePath.USER_EDIT_PATH, num) + "boxModels/" + sid + ".glb");
|
|
|
|
|
|
//上传原始obj相关文件
|
|
//上传原始obj相关文件
|
|
|
|
+ String objPath = String.format(UploadFilePath.USER_EDIT_PATH, num) + "boxModels/" + sid + "/";
|
|
|
|
+ //先删除旧的,只需要保留最新的
|
|
|
|
+ fYunFileService.deleteFolder(objPath);
|
|
List<File> files = FileUtil.loopFiles(srcPath);
|
|
List<File> files = FileUtil.loopFiles(srcPath);
|
|
files.stream().forEach(v->{
|
|
files.stream().forEach(v->{
|
|
String ossKey = String.format(UploadFilePath.USER_EDIT_PATH, num) + "boxModels/" + sid + "/" + v.getAbsolutePath().replace(srcPath, "");
|
|
String ossKey = String.format(UploadFilePath.USER_EDIT_PATH, num) + "boxModels/" + sid + "/" + v.getAbsolutePath().replace(srcPath, "");
|