mirror of
https://github.com/rclone/rclone.git
synced 2025-08-16 08:38:11 +02:00
s3: fix missing "tier" metadata
Before this change if the storage class wasn't set on the object, we didn't set the "tier" metadata. This made it impossible to filter on tier using the metadata filters. This returns the "tier" metadata as STANDARD if the storage class isn't set on the object. See: https://forum.rclone.org/t/copy-from-s3-to-another-s3-filter-by-storage-class/37861
This commit is contained in:
@ -5865,7 +5865,7 @@ func (o *Object) Metadata(ctx context.Context) (metadata fs.Metadata, err error)
|
||||
setMetadata("content-disposition", o.contentDisposition)
|
||||
setMetadata("content-encoding", o.contentEncoding)
|
||||
setMetadata("content-language", o.contentLanguage)
|
||||
setMetadata("tier", o.storageClass)
|
||||
metadata["tier"] = o.GetTier()
|
||||
|
||||
return metadata, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user