Skip to content

Commit

Permalink
fix(api): multipart array length calculation fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
lambacini committed Aug 22, 2023
1 parent 6d6ae85 commit 0eaaad4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,13 @@ function multipartEncode(
const contentArray = new Uint8Array(datasetBuffer);
const contentLength = contentArray.length;

length += headerLength + contentLength + footerLength;
length += headerLength + contentLength;

return contentArray;
});

length += footerLength;

// Allocate the array
const multipartArray = new Uint8Array(length);

Expand Down

0 comments on commit 0eaaad4

Please sign in to comment.