@azure/storage-blob 12.26.0-alpha.20250311.1 → 12.26.0-alpha.20250314.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/dist-esm/storage-blob/src/Clients.js +11 -11
- package/dist-esm/storage-blob/src/Clients.js.map +1 -1
- package/package.json +1 -1
- package/types/latest/storage-blob.d.ts +11 -11
@@ -176,16 +176,16 @@ export class BlobClient extends StorageClient {
|
|
176
176
|
* console.log("Downloaded blob content:", downloaded.toString());
|
177
177
|
*
|
178
178
|
* async function streamToBuffer(readableStream) {
|
179
|
-
*
|
180
|
-
*
|
181
|
-
*
|
182
|
-
*
|
183
|
-
*
|
184
|
-
*
|
185
|
-
*
|
186
|
-
*
|
187
|
-
*
|
188
|
-
*
|
179
|
+
* return new Promise((resolve, reject) => {
|
180
|
+
* const chunks = [];
|
181
|
+
* readableStream.on("data", (data) => {
|
182
|
+
* chunks.push(typeof data === "string" ? Buffer.from(data) : data);
|
183
|
+
* });
|
184
|
+
* readableStream.on("end", () => {
|
185
|
+
* resolve(Buffer.concat(chunks));
|
186
|
+
* });
|
187
|
+
* readableStream.on("error", reject);
|
188
|
+
* });
|
189
189
|
* }
|
190
190
|
* ```
|
191
191
|
*
|
@@ -1381,7 +1381,7 @@ export class BlockBlobClient extends BlobClient {
|
|
1381
1381
|
* return new Promise((resolve, reject) => {
|
1382
1382
|
* const chunks = [];
|
1383
1383
|
* readableStream.on("data", (data) => {
|
1384
|
-
* chunks.push(data
|
1384
|
+
* chunks.push(typeof data === "string" ? Buffer.from(data) : data);
|
1385
1385
|
* });
|
1386
1386
|
* readableStream.on("end", () => {
|
1387
1387
|
* resolve(Buffer.concat(chunks));
|