diff --git a/providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/AzureBlobStore.java b/providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/AzureBlobStore.java index 45d3e7ca56..4702a05343 100644 --- a/providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/AzureBlobStore.java +++ b/providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/AzureBlobStore.java @@ -242,15 +242,25 @@ public class AzureBlobStore extends BaseBlobStore { URI source = context.getSigner().signGetBlob(fromContainer, fromName).getEndpoint(); String eTag = sync.copyBlob(source, toContainer, toName, azureOptions.build()); - ContentMetadataBuilder builder = ContentMetadataBuilder.create(); - Optional contentMetadata = options.getContentMetadata(); if (contentMetadata.isPresent()) { + ContentMetadataBuilder builder = ContentMetadataBuilder.create(); + String contentDisposition = contentMetadata.get().getContentDisposition(); if (contentDisposition != null) { builder.contentDisposition(contentDisposition); } + String contentEncoding = contentMetadata.get().getContentEncoding(); + if (contentEncoding != null) { + builder.contentEncoding(contentEncoding); + } + + String contentLanguage = contentMetadata.get().getContentLanguage(); + if (contentLanguage != null) { + builder.contentLanguage(contentLanguage); + } + String contentType = contentMetadata.get().getContentType(); if (contentType != null) { builder.contentType(contentType); @@ -259,10 +269,6 @@ public class AzureBlobStore extends BaseBlobStore { eTag = sync.setBlobProperties(toContainer, toName, builder.build()); } - if (userMetadata.isPresent()) { - eTag = sync.setBlobMetadata(toContainer, toName, userMetadata.get()); - } - return eTag; }