@azure/storage-blob
Advanced tools
Comparing version 12.0.1-dev.20191203.1 to 12.0.1
{ | ||
"name": "@azure/storage-blob", | ||
"sdk-type": "client", | ||
"version": "12.0.1-dev.20191203.1", | ||
"version": "12.0.1", | ||
"description": "Microsoft Azure Storage SDK for JavaScript - Blob", | ||
@@ -85,3 +85,3 @@ "main": "./dist/index.js", | ||
"@azure/core-paging": "^1.0.0", | ||
"@azure/core-tracing": "^1.0.0-dev", | ||
"@azure/core-tracing": "1.0.0-preview.7", | ||
"@azure/logger": "^1.0.0", | ||
@@ -93,3 +93,3 @@ "@opentelemetry/types": "^0.2.0", | ||
"devDependencies": { | ||
"@azure/test-utils-recorder": "^1.0.0-dev", | ||
"@azure/test-utils-recorder": "^1.0.0", | ||
"@azure/identity": "^1.0.0", | ||
@@ -96,0 +96,0 @@ "@microsoft/api-extractor": "^7.5.4", |
@@ -348,3 +348,3 @@ # Azure Storage Blob client library for JavaScript | ||
const containerClient = blobServiceClient.getContainerClient(containerName); | ||
let i = 1; | ||
@@ -407,19 +407,18 @@ let iter = await containerClient.listBlobsFlat(); | ||
### Download a blob and convert it to a string (Browsers) | ||
### Download a blob and convert it to a string (Browsers). | ||
Please refer to the [JavaScript Bundle](#javascript-bundle) section for more information on using this library in the browser. | ||
```javascript | ||
const { DefaultAzureCredential } = require("@azure/identity"); | ||
const { BlobServiceClient } = require("@azure/storage-blob"); | ||
const account = "<account>"; | ||
const defaultAzureCredential = new DefaultAzureCredential(); | ||
const account = "<account name>"; | ||
const sas = "<service Shared Access Signature Token>"; | ||
const containerName = "<container name>"; | ||
const blobName = "<blob name>" | ||
const blobServiceClient = new BlobServiceClient( | ||
`https://${account}.blob.core.windows.net`, | ||
defaultAzureCredential | ||
`https://${account}.blob.core.windows.net${sas}` | ||
); | ||
const containerName = "<container name>"; | ||
const blobName = "<blob name>" | ||
async function main() { | ||
@@ -439,7 +438,7 @@ const containerClient = blobServiceClient.getContainerClient(containerName); | ||
// [Browsers only] A helper method used to convert a browser Blob into string. | ||
async function blobToString(blob: Blob): Promise<string> { | ||
async function blobToString(blob){ | ||
const fileReader = new FileReader(); | ||
return new Promise<string>((resolve, reject) => { | ||
fileReader.onloadend = (ev: any) => { | ||
resolve(ev.target!.result); | ||
return new Promise((resolve, reject) => { | ||
fileReader.onloadend = (ev) => { | ||
resolve(ev.target.result); | ||
}; | ||
@@ -446,0 +445,0 @@ fileReader.onerror = reject; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
4904531
487
+ Added@azure/core-tracing@1.0.0-preview.7(transitive)
- Removed@azure/core-tracing@1.0.0-preview.111.2.0(transitive)
- Removed@opentelemetry/api@1.0.0-rc.0(transitive)