mirror of
https://github.com/minio/minio.git
synced 2024-12-25 14:45:54 -05:00
Fix CopyObject with metadata for Azure gateway (#4986)
This commit is contained in:
parent
b415c600e1
commit
b05351c420
@ -543,10 +543,17 @@ func (a *azureObjects) PutObject(bucket, object string, data *HashReader, metada
|
||||
func (a *azureObjects) CopyObject(srcBucket, srcObject, destBucket, destObject string, metadata map[string]string) (objInfo ObjectInfo, err error) {
|
||||
srcBlobURL := a.client.GetContainerReference(srcBucket).GetBlobReference(srcObject).GetURL()
|
||||
destBlob := a.client.GetContainerReference(destBucket).GetBlobReference(destObject)
|
||||
azureMeta, props := s3MetaToAzureProperties(metadata)
|
||||
destBlob.Metadata = azureMeta
|
||||
err = destBlob.Copy(srcBlobURL, nil)
|
||||
if err != nil {
|
||||
return objInfo, azureToObjectError(traceError(err), srcBucket, srcObject)
|
||||
}
|
||||
destBlob.Properties = props
|
||||
err = destBlob.SetProperties(nil)
|
||||
if err != nil {
|
||||
return objInfo, azureToObjectError(traceError(err), srcBucket, srcObject)
|
||||
}
|
||||
return a.GetObjectInfo(destBucket, destObject)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user