Skip to content

Commit

Permalink
fix code
Browse files Browse the repository at this point in the history
  • Loading branch information
hdthinh1012 committed Sep 26, 2024
1 parent 0a89009 commit b9a6f0f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions content/4-Code-explanation/4.2-detail/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,10 @@ export class AWSS3FileReadStream extends Readable {
Body.transformToByteArray()
.then((chunk) => {
this.chunksConcat(chunk);
if (this.chunks.byteLength >= this.highWaterMark) {
let uploadingChunk = this.chunks;
this.chunks = new Uint8Array(0);
console.log('read stream push chunk', uploadingChunk);
this.push(uploadingChunk);
}
let uploadingChunk = this.chunks;
this.chunks = new Uint8Array(0);
console.log('read stream push chunk', uploadingChunk);
this.push(uploadingChunk);
})
.catch((error) => {
console.log('Body.transformToByteArray() error', error);
Expand Down

0 comments on commit b9a6f0f

Please sign in to comment.