yakovkhalinsky/backblaze-b2

Byte length not same as content-length

devksingh4 opened this issue · 2 comments

Hello,
When I am downloading arbitrary data stored in B2 bucket, the content-length header has the correct byte length of 208374 but when I call:

Buffer.byteLength(resp.data)

where resp is the await return value from b2.downloadFileById(), I get 378415. Even the backblaze UI shows that the size is 208.4 kB. What is the correct way to decode the data sent from the downloadFileById() method to get the correct-size Buffer or Uint8 array?

What is the response's Content-Type ?

What is the response's Content-Type ?

It is application/octet-stream.