Skip to content

Commit

Permalink
use uploadData instead of uploadBrowserData in samples: Fixes Azure#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
ljian3377 committed Jan 6, 2021
1 parent cd97a78 commit 36cbb44
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async function upload() {
);

const file = document.getElementById("file").files[0];
await blockBlobClient.uploadBrowserData(file, {
await blockBlobClient.uploadData(file, {
maxSingleShotSize: 4 * 1024 * 1024
});
}
6 changes: 3 additions & 3 deletions sdk/storage/storage-blob/samples/javascript/advanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ async function main() {
);
}

// Parallel uploading a browser File/Blob/ArrayBuffer in browsers with BlockBlobClient.uploadBrowserData()
// Uncomment following code in browsers because BlockBlobClient.uploadBrowserData() is only available in browsers
// Parallel uploading a browser File/Blob/ArrayBuffer in browsers with BlockBlobClient.uploadData()
// Uncomment following code in browsers because document is only available in browsers
/*
const browserFile = document.getElementById("fileinput").files[0];
await blockBlobClient.uploadBrowserData(browserFile, {
await blockBlobClient.uploadData(browserFile, {
blockSize: 4 * 1024 * 1024, // 4MB block size
concurrency: 20, // 20 concurrency
onProgress: ev => console.log(ev)
Expand Down
6 changes: 3 additions & 3 deletions sdk/storage/storage-blob/samples/typescript/src/advanced.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ export async function main() {
);
}

// Parallel uploading a browser File/Blob/ArrayBuffer in browsers with BlockBlobClient.uploadBrowserData()
// Uncomment following code in browsers because BlockBlobClient.uploadBrowserData() is only available in browsers
// Parallel uploading a browser File/Blob/ArrayBuffer in browsers with BlockBlobClient.uploadData()
// Uncomment following code in browsers because document is only available in browsers
/*
const browserFile = document.getElementById("fileinput").files[0];
await blockBlobClient.uploadBrowserData(browserFile, {
await blockBlobClient.uploadData(browserFile, {
blockSize: 4 * 1024 * 1024, // 4MB block size
concurrency: 20, // 20 concurrency
onProgress: ev => console.log(ev)
Expand Down

0 comments on commit 36cbb44

Please sign in to comment.