mirror of
https://gitee.com/lxp135/minio-plus.git
synced 2025-12-06 08:58:25 +08:00
兼容了空对象的情况,很多用户在实现 one 方法时习惯于返回一个空对象。
This commit is contained in:
parent
33cf6db82c
commit
e8703eae6e
@ -512,7 +512,10 @@ public class StorageEngineServiceImpl implements StorageEngineService {
|
|||||||
fileMetadataInfo.setIsFinished(Boolean.TRUE);
|
fileMetadataInfo.setIsFinished(Boolean.TRUE);
|
||||||
FileMetadataInfoVo fileMetadataInfoVo = metadataRepository.one(fileMetadataInfo);
|
FileMetadataInfoVo fileMetadataInfoVo = metadataRepository.one(fileMetadataInfo);
|
||||||
|
|
||||||
if (null == fileMetadataInfoVo) {
|
if (null == fileMetadataInfoVo
|
||||||
|
|| (null == fileMetadataInfoVo.getId() && null == fileMetadataInfoVo.getFileKey() && null == fileMetadataInfoVo.getFileMd5())
|
||||||
|
) {
|
||||||
|
// 兼容了空对象的情况,很多用户在实现 one 方法时习惯于返回一个空对象
|
||||||
// 当不存在任何该MD5值的文件元数据时,删除物理文件
|
// 当不存在任何该MD5值的文件元数据时,删除物理文件
|
||||||
minioS3Client.removeObject(metadata.getStorageBucket(), metadata.getStoragePath() + "/" + metadata.getFileMd5());
|
minioS3Client.removeObject(metadata.getStorageBucket(), metadata.getStoragePath() + "/" + metadata.getFileMd5());
|
||||||
if (Boolean.TRUE.equals(metadata.getIsPreview())) {
|
if (Boolean.TRUE.equals(metadata.getIsPreview())) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user