mirror of
https://github.com/minio/minio.git
synced 2026-11-13 14:44:19 +00: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:
1 parent
8aae8b1d27
commit
e79874f58e
7 files changed
+57
-12
No files matched your search
@@ -608,7 +608,10 @@ func (er erasureObjects) putObject(ctx context.Context, bucket string, object st
|
||||
fi := newFileInfo(object, dataDrives, parityDrives)
|
||||
|
||||
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