Azure-Samples / Azure-Samples/AzureStorageSnippets

storage blob upload from string incorrect

Open
#389 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.