|
|
@ -324,8 +324,9 @@ func (fs fsObjects) PutObjectPart(bucket, object, uploadID string, partID int, s |
|
|
|
return "", InvalidUploadID{UploadID: uploadID} |
|
|
|
return "", InvalidUploadID{UploadID: uploadID} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
partSuffix := fmt.Sprintf("%s.%d.%s", uploadID, partID, md5Hex) |
|
|
|
partSuffix := fmt.Sprintf("%s.%d", uploadID, partID) |
|
|
|
fileWriter, err := fs.storage.CreateFile(minioMetaVolume, path.Join(bucket, object, partSuffix)) |
|
|
|
partSuffixPath := path.Join(bucket, object, partSuffix) |
|
|
|
|
|
|
|
fileWriter, err := fs.storage.CreateFile(minioMetaVolume, partSuffixPath) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return "", toObjectErr(err, bucket, object) |
|
|
|
return "", toObjectErr(err, bucket, object) |
|
|
|
} |
|
|
|
} |
|
|
@ -367,6 +368,12 @@ func (fs fsObjects) PutObjectPart(bucket, object, uploadID string, partID int, s |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return "", err |
|
|
|
return "", err |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
partSuffixMD5 := fmt.Sprintf("%s.%d.%s", uploadID, partID, newMD5Hex) |
|
|
|
|
|
|
|
partSuffixMD5Path := path.Join(bucket, object, partSuffixMD5) |
|
|
|
|
|
|
|
err = fs.storage.RenameFile(minioMetaVolume, partSuffixPath, minioMetaVolume, partSuffixMD5Path) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
return "", err |
|
|
|
|
|
|
|
} |
|
|
|
return newMD5Hex, nil |
|
|
|
return newMD5Hex, nil |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|