Azure-Samples / Azure-Samples/AzureStorageSnippets
storage blob upload from string incorrect
Open
- Dominant language
- JavaScript
- Stars
- 41
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/Azure-Samples/AzureStorageSnippets/blob/264023a1c07c2118ede368f88d94d707f1bce716/blobs/howto/TypeScript/NodeJS-v12/dev-guide/src/blob-upload-from-string.ts#L24
https://github.com/Azure-Samples/AzureStorageSnippets/blob/264023a1c07c2118ede368f88d94d707f1bce716/blobs/howto/TypeScript/NodeJS-v12/dev-guide/src/blob-upload-from-string-with-access-tier.ts#L38
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.
Contributor guide
Assessment
This issue has not been assessed yet.