@azure/storage-blob
Advanced tools
Comparing version 12.2.0-alpha.20200904.1 to 12.2.0-alpha.20200907.1
# Release History | ||
## 12.2.0 (Unreleased) | ||
## 12.2.0 (2020-09-08) | ||
- Added RehydratePriority to BlobProperties and BlobItemProperties. | ||
- Fixed `BlockBlobClient.uploadStream()` to support bufferSize larger than `buffer.constants.MAX_LENGTH` for Jumbo Blob (~200TB Block Blob). | ||
- Fixed `BlockBlobClient.uploadStream()` to support `bufferSize` larger than `buffer.constants.MAX_LENGTH`. | ||
- Added support for Object Replication Service. | ||
@@ -11,2 +11,7 @@ - Added custom domain support. | ||
- Supported tags conditional operations. | ||
- The Static Website Service now supports a DefaultIndexDocumentPath for a global HTTP 200 route within the static website. You can get it by `BlobServiceClient.getProperties()` and set it via `blobServiceClient.setProperties()`. | ||
- Bug fix - `credential` parameter of `newPipeline()` function is now optional. If not specified, `AnonymousCredential` is used. Fixes bug [9628](https://github.com/Azure/azure-sdk-for-js/issues/9628). | ||
- Bug fix - high level upload functions `BlockBlobClient.uploadFile()`, `BlockBlobClient.uploadStream()` and `BlockBlobClient.uploadBrowserData()` now support setting tier. Fixes bug [9062](https://github.com/Azure/azure-sdk-for-js/issues/9062). | ||
- Optimized error semantic for `listBlobsByHierarchy()`. Using `listBlobsByHierarchy()` with empty `delimiter` will now fail-fast. | ||
- Bug fix - Content-Length header is no more ignored. Fixes bugs [8903](https://github.com/Azure/azure-sdk-for-js/issues/8903), [9300](https://github.com/Azure/azure-sdk-for-js/issues/9300) and [10614](https://github.com/Azure/azure-sdk-for-js/issues/10614). | ||
@@ -13,0 +18,0 @@ ## 12.2.0-preview.1 (2020.07) |
{ | ||
"name": "@azure/storage-blob", | ||
"sdk-type": "client", | ||
"version": "12.2.0-alpha.20200904.1", | ||
"version": "12.2.0-alpha.20200907.1", | ||
"description": "Microsoft Azure Storage SDK for JavaScript - Blob", | ||
@@ -6,0 +6,0 @@ "main": "./dist/index.js", |
@@ -437,14 +437,14 @@ # Azure Storage Blob client library for JavaScript | ||
const downloadBlockBlobResponse = await blobClient.download(); | ||
const downloaded = await streamToString(downloadBlockBlobResponse.readableStreamBody); | ||
const downloaded = (await streamToBuffer(downloadBlockBlobResponse.readableStreamBody)).toString(); | ||
console.log("Downloaded blob content:", downloaded); | ||
// [Node.js only] A helper method used to read a Node.js readable stream into string | ||
async function streamToString(readableStream) { | ||
// [Node.js only] A helper method used to read a Node.js readable stream into a Buffer | ||
async function streamToBuffer(readableStream) { | ||
return new Promise((resolve, reject) => { | ||
const chunks = []; | ||
readableStream.on("data", (data) => { | ||
chunks.push(data.toString()); | ||
chunks.push(data instanceof Buffer ? data : Buffer.from(data)); | ||
}); | ||
readableStream.on("end", () => { | ||
resolve(chunks.join("")); | ||
resolve(Buffer.concat(chunks)); | ||
}); | ||
@@ -451,0 +451,0 @@ readableStream.on("error", reject); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
6004430