diff --git a/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobClient.java b/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobClient.java index 31f991104f..76db242f8d 100644 --- a/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobClient.java +++ b/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobClient.java @@ -394,6 +394,7 @@ String putBlockList(@PathParam("container") @ParamValidators(ContainerNameValida @PathParam("name") @ParamParser(BlobName.class) @BinderParam(BindAzureBlobMetadataToMultipartRequest.class) AzureBlob object, @BinderParam(BindAzureBlocksToRequest.class) List blockIdList); + @Deprecated @Named("GetBlockList") @GET @Path("{container}/{name}") @@ -403,6 +404,16 @@ ListBlobBlocksResponse getBlockList( @PathParam("container") @ParamValidators(ContainerNameValidator.class) String container, @PathParam("name") String name); + @Named("GetBlockList") + @GET + @Path("{container}/{name}") + @XMLResponseParser(BlobBlocksResultsHandler.class) + @QueryParams(keys = { "comp" }, values = { "blocklist" }) + ListBlobBlocksResponse getBlockList( + @PathParam("container") @ParamValidators(ContainerNameValidator.class) String container, + @PathParam("name") String name, + // valid values are committed, uncommitted, or all + @QueryParam("blocklisttype") String blockListType); /** * The Get Blob Properties operation returns all user-defined metadata, standard HTTP properties, 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 147ce0cc9b..1dc63a2457 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 @@ -458,7 +458,7 @@ public MultipartPart uploadMultipartPart(MultipartUpload mpu, int partNumber, Pa public List listMultipartUpload(MultipartUpload mpu) { ListBlobBlocksResponse response; try { - response = sync.getBlockList(mpu.containerName(), mpu.blobName()); + response = sync.getBlockList(mpu.containerName(), mpu.blobName(), "uncommitted"); } catch (KeyNotFoundException knfe) { return ImmutableList.of(); }