【发布时间】:2019-04-25 17:27:07
【问题描述】:
我尝试关注 azure storage Samples 并且能够上传 blob。我正在尝试获取已上传 blob 的 Uri,但无法获取 Uri。
在之前的 SDK v7 中,我可以做 blobItem.getUri(),但在新版本中找不到。我尝试了以下方法,但是元数据没有 Uri,它实际上是属性。我如何获得 Uri
blobURL.upload(Flowable.just(ByteBuffer.wrap(image)), image.length, headers, mData, null, null)
.flatMap(bulkBlockBlobUploadResponse -> {
this.getContext().getLogger().info(bulkBlockBlobUploadResponse.headers().eTag());
return Single.just(true);
})
.flatMap(response ->
// Query the blob's properties and metadata.
this.getBlockBlobURL().getProperties(null, null))
.flatMap(blobGetPropertiesResponse -> {
this.getContext().getLogger().info(blobGetPropertiesResponse.headers().metadata().toString());
return Single.just(true);
})
【问题讨论】:
标签: java azure rx-java azure-storage azure-blob-storage