BUGFIX: library upload md5重复校验优化;

This commit is contained in:
shahaibo
2023-10-18 15:57:28 +08:00
parent 81d20625f5
commit 4b28732d32

View File

@@ -184,6 +184,7 @@ public class LibraryServiceImpl extends ServiceImpl<LibraryMapper, Library> impl
LibraryUpdateVo libraryUpdateVo = CopyUtil.copyObject(library, LibraryUpdateVo.class);
libraryUpdateVo.setMinIOPath(libraryUpdateVo.getUrl());
libraryUpdateVo.setUrl(minioUtil.getPresignedUrl(newFilePath, 24 * 60));
libraryUpdateVo.setCheckMd5(Boolean.TRUE);
return libraryUpdateVo;
}else if (libraryUploadDTO.getModelType().equals(ModelType.SYSTEM.getValue())) {
bucketName = "aida-sys-image";
@@ -194,6 +195,7 @@ public class LibraryServiceImpl extends ServiceImpl<LibraryMapper, Library> impl
LibraryUpdateVo libraryUpdateVo = CopyUtil.copyObject(library, LibraryUpdateVo.class);
libraryUpdateVo.setMinIOPath(libraryUpdateVo.getUrl());
libraryUpdateVo.setUrl(minioUtil.getPresignedUrl(newFilePath, 24 * 60));
libraryUpdateVo.setCheckMd5(Boolean.TRUE);
return libraryUpdateVo;
}else {
throw new BusinessException("unknown modelType");
@@ -205,6 +207,7 @@ public class LibraryServiceImpl extends ServiceImpl<LibraryMapper, Library> impl
LibraryUpdateVo libraryUpdateVo = CopyUtil.copyObject(library, LibraryUpdateVo.class);
libraryUpdateVo.setMinIOPath(libraryUpdateVo.getUrl());
libraryUpdateVo.setUrl(minioUtil.getPresignedUrl(libraryUpdateVo.getUrl(), 24 * 60));
libraryUpdateVo.setCheckMd5(Boolean.TRUE);
return libraryUpdateVo;
}
}