mirror of
https://github.com/versity/versitygw.git
synced 2026-09-07 16:46:56 +00:00
feat: Implemented object versioning for multipart uploads. Implemented integration tests for the versioning implementation for multipart uploads
This commit is contained in:
committed by
Ben McClelland
parent
6d4ff09d6f
commit
800cf62209
@@ -1850,6 +1850,14 @@ func (c S3ApiController) PutActions(ctx *fiber.Ctx) error {
|
||||
ExpectedBucketOwner: &bucketOwner,
|
||||
CopySourceRange: ©SrcRange,
|
||||
})
|
||||
if err == nil && resp.CopySourceVersionId != "" {
|
||||
utils.SetResponseHeaders(ctx, []utils.CustomHeader{
|
||||
{
|
||||
Key: "x-amz-copy-source-version-id",
|
||||
Value: resp.CopySourceVersionId,
|
||||
},
|
||||
})
|
||||
}
|
||||
return SendXMLResponse(ctx, resp, err,
|
||||
&MetaOpts{
|
||||
Logger: c.logger,
|
||||
@@ -3144,6 +3152,14 @@ func (c S3ApiController) CreateActions(ctx *fiber.Ctx) error {
|
||||
},
|
||||
})
|
||||
if err == nil {
|
||||
if getstring(res.VersionId) != "" {
|
||||
utils.SetResponseHeaders(ctx, []utils.CustomHeader{
|
||||
{
|
||||
Key: "x-amz-version-id",
|
||||
Value: getstring(res.VersionId),
|
||||
},
|
||||
})
|
||||
}
|
||||
return SendXMLResponse(ctx, res, err,
|
||||
&MetaOpts{
|
||||
Logger: c.logger,
|
||||
|
||||
Reference in New Issue
Block a user