Fix CopyObject with metadata for GCS Gateway (#4971)

master
Aditya Manthramurthy 7 years ago committed by Dee Koder
parent 6dcfaa877c
commit b5dc4b5873
  1. 5
      cmd/gateway-gcs.go

@ -762,7 +762,10 @@ func (l *gcsGateway) CopyObject(srcBucket string, srcObject string, destBucket s
src := l.client.Bucket(srcBucket).Object(srcObject)
dst := l.client.Bucket(destBucket).Object(destObject)
attrs, err := dst.CopierFrom(src).Run(l.ctx)
copier := dst.CopierFrom(src)
copier.ObjectAttrs.Metadata = metadata
attrs, err := copier.Run(l.ctx)
if err != nil {
return ObjectInfo{}, gcsToObjectError(traceError(err), destBucket, destObject)
}

Loading…
Cancel
Save