If you call CloudBlockBlob.UploadText
on an existing blob, the contents of the blob will be updated with the new text. Old contents will be overwritten.
To append text to an existing blob, you could do two things:
- Before calling
UploadText
, get the contents of the blob by downloading the blob and append the new text and then call UploadText. This would work fine for small sized blobs but not for large sized blobs. - Make sure the original blob is uploaded by uploading in chunks i.e. using
PutBlock
andPutBlockList
. Then you get the block list before uploading, append a new block to your blob and then call PutBlockList to commit the changes. This may be an overkill for small sized blobs but work well for large sized blobs.