@@ -191,6 +191,11 @@ public class OssUtil {
}
+ public String uploadFileString(String bucket, String pathKey, String content) {
+ FileUtil.writeUtf8String(content, FdkkLaserConfig.getProfile(bucket) + File.separator + pathKey);
+ return pathKey;
+ }
+
public String uploadFileStream(String bucket, String pathKey, InputStream stream) {
if (FdkkLaserConfig.isBucket()) {
if (FdkkLaserConfig.isLocalization()) {
@@ -102,7 +102,8 @@ public class BoxModelServiceImpl implements IBoxModelService {
//转glb
OBJToGLBUtil.objToGlb(srcPath, glbPath);
- if(!ComputerUtil.checkComputeCompleted(glbPath, 3, 2000)){
+ log.info("glbPath:{}", glbPath);
+ if(!ComputerUtil.checkComputeCompleted(glbPath, 10, 2000)){
throw new BusinessException(ErrorCode.FAILURE_CODE_7013);
@@ -383,7 +383,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
return;
List<JSONObject> collect = list.stream().map(str -> JSON.parseObject(str)).collect(Collectors.toList());
- ossUtil.uploadFileBytes(bucket, userEditPath, JSON.toJSONString(collect).getBytes());
+ ossUtil.uploadFileString(bucket, userEditPath, JSON.toJSONString(collect));
@Override
@@ -905,6 +905,8 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
fileNames.stream().forEach(name->{
ossUtil.uploadFile(bucket,ossMeshPath + File.separator + name, filePath + name, false);
});
+ ossUtil.uploadMulFiles(bucket, map);
private void writeDataJson(String path) throws IOException {