@aws-sdk/chunked-blob-reader
Advanced tools
Comparing version 3.183.0 to 3.186.0
@@ -6,2 +6,10 @@ # Change Log | ||
# [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06) | ||
**Note:** Version bump only for package @aws-sdk/chunked-blob-reader | ||
# [3.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03) | ||
@@ -8,0 +16,0 @@ |
@@ -1,8 +0,9 @@ | ||
export function blobReader(blob, onChunk, chunkSize = 1024 * 1024) { | ||
return new Promise((resolve, reject) => { | ||
const fileReader = new FileReader(); | ||
export function blobReader(blob, onChunk, chunkSize) { | ||
if (chunkSize === void 0) { chunkSize = 1024 * 1024; } | ||
return new Promise(function (resolve, reject) { | ||
var fileReader = new FileReader(); | ||
fileReader.addEventListener("error", reject); | ||
fileReader.addEventListener("abort", reject); | ||
const size = blob.size; | ||
let totalBytesRead = 0; | ||
var size = blob.size; | ||
var totalBytesRead = 0; | ||
function read() { | ||
@@ -15,4 +16,4 @@ if (totalBytesRead >= size) { | ||
} | ||
fileReader.addEventListener("load", (event) => { | ||
const result = event.target.result; | ||
fileReader.addEventListener("load", function (event) { | ||
var result = event.target.result; | ||
onChunk(new Uint8Array(result)); | ||
@@ -19,0 +20,0 @@ totalBytesRead += result.byteLength; |
{ | ||
"name": "@aws-sdk/chunked-blob-reader", | ||
"version": "3.183.0", | ||
"version": "3.186.0", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", |
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
32326
57