azure-sdk-for-js: [Blob Storage] Question: Data corruption failure error

Hi, @bterlson. I have a problem with downloading compressed files from blob storage.

When I using an example from the Readme.md with such compressed file, I have error: Data corruption failure: Received more data than original request, data needed offset is 1153489, received offset: 3393683

The error reason is different contentLength and real data size, because my stream is not deflated. How should I change the example code to fix the error?

Additional info

const res = await blob.getProperties();
console.log(res)

Will log

{
  lastModified: 2019-11-28T14:27:55.000Z,
  createdOn: 2019-11-27T23:36:30.000Z,
  metadata: {},
  blobType: 'BlockBlob',
  copyCompletedOn: undefined,
  copyStatusDescription: undefined,
  copyId: undefined,
  copyProgress: undefined,
  copySource: undefined,
  copyStatus: undefined,
  isIncrementalCopy: undefined,
  destinationSnapshot: undefined,
  leaseDuration: undefined,
  leaseState: 'available',
  leaseStatus: 'unlocked',
  contentLength: 1153490,
  contentType: 'application/json',
  etag: '"0x8D7740F28F40C97"',
  contentMD5: <Buffer 0f 86 d4 64 2d ef 85 e5 60 6c a7 1c 1c a5 70 bf>,
  contentEncoding: 'deflate',
  contentDisposition: undefined,
  contentLanguage: undefined,
  cacheControl: 'max-age=3600',
  blobSequenceNumber: undefined,
  clientRequestId: 'ed64af31-630f-4227-b774-e6b2cea238f7',
  requestId: 'a737b7df-101e-001b-65e1-aa6662000000',
  version: '2019-02-02',
  date: 2019-12-04T20:28:28.000Z,
  acceptRanges: 'bytes',
  blobCommittedBlockCount: undefined,
  isServerEncrypted: true,
  encryptionKeySha256: undefined,
  accessTier: 'Hot',
  accessTierInferred: true,
  archiveStatus: undefined,
  accessTierChangedOn: undefined,
  errorCode: undefined,
  body: true
}

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 21 (16 by maintainers)

Commits related to this issue

Most upvoted comments

@jiacfan @ljian3377 Please take a look~