mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
[feat] Preserve version supplied by client (#9854)
Just like GET/DELETE APIs it is possible to preserve client supplied versionId's, of course the versionIds have to be uuid, if an existing versionId is found it is overwritten if no object locking policies are found. - PUT /bucketname/objectname?versionId=<id> - POST /bucketname/objectname?uploads=&versionId=<id> - PUT /bucketname/objectname?verisonId=<id> (with x-amz-copy-source)
This commit is contained in:
@@ -142,7 +142,10 @@ func (er erasureObjects) newMultipartUpload(ctx context.Context, bucket string,
|
||||
|
||||
// Calculate the version to be saved.
|
||||
if opts.Versioned {
|
||||
fi.VersionID = mustGetUUID()
|
||||
fi.VersionID = opts.VersionID
|
||||
if fi.VersionID == "" {
|
||||
fi.VersionID = mustGetUUID()
|
||||
}
|
||||
}
|
||||
|
||||
fi.DataDir = mustGetUUID()
|
||||
|
||||
Reference in New Issue
Block a user