|
await blockBlobClient.upload(fileContents, fileContents.length); |
|
fileContentsAsString.length, |
we should not pass string length to blobClient.upload(). The methods take byte length, not string length which can be different and could leads to data corruption.
AzureStorageSnippets/blobs/howto/TypeScript/NodeJS-v12/dev-guide/src/blob-upload-from-string.ts
Line 24 in 264023a
AzureStorageSnippets/blobs/howto/TypeScript/NodeJS-v12/dev-guide/src/blob-upload-from-string-with-access-tier.ts
Line 38 in 264023a
we should not pass string length to blobClient.upload(). The methods take byte length, not string length which can be different and could leads to data corruption.