mirror of
https://github.com/versity/versitygw.git
synced 2026-09-20 15:04:27 +00:00
CopyObject metadata (#265)
* fix: Object tag actions cleanup * fix: Fixes #249, Changed ListObjects default max-keys from -1 to 1000 * fix: Fixes #250, Added support to provide a marker not from the objects list and list the objects after the provided marker in ListObjects(V2) actions * feat: Closes #256, Addded a check step, to compare object metadatas and allow the copying to itself, if the metadata has been changed * fix: Simplified range assignment in CopyObject posix function
This commit is contained in:
@@ -593,6 +593,9 @@ func (c S3ApiController) PutActions(ctx *fiber.Ctx) error {
|
||||
return SendXMLResponse(ctx, nil, s3err.GetAPIError(s3err.ErrInvalidCopySource), &MetaOpts{Logger: c.logger, Action: "CopyObject", BucketOwner: parsedAcl.Owner})
|
||||
}
|
||||
}
|
||||
|
||||
metadata := utils.GetUserMetaData(&ctx.Request().Header)
|
||||
|
||||
res, err := c.be.CopyObject(ctx.Context(), &s3.CopyObjectInput{
|
||||
Bucket: &bucket,
|
||||
Key: &keyStart,
|
||||
@@ -602,6 +605,7 @@ func (c S3ApiController) PutActions(ctx *fiber.Ctx) error {
|
||||
CopySourceIfModifiedSince: &mtime,
|
||||
CopySourceIfUnmodifiedSince: &umtime,
|
||||
ExpectedBucketOwner: &access,
|
||||
Metadata: metadata,
|
||||
})
|
||||
if err == nil {
|
||||
return SendXMLResponse(ctx, res, err, &MetaOpts{
|
||||
|
||||
Reference in New Issue
Block a user