Skip to content

Commit 3f83c02

Browse files
Merge pull request #250110 from pauljewellmsft/pauljewell-append
Update append blob sample
2 parents 52858b3 + 697f6b9 commit 3f83c02

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

articles/storage/blobs/storage-blob-append.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
22
title: Append data to a blob with .NET
33
titleSuffix: Azure Storage
4-
description: Learn how to append data to a blob in Azure Storage by using the.NET client library.
4+
description: Learn how to append data to an append blob in Azure Storage by using the.NET client library.
55
author: pauljewellmsft
66

77
ms.author: pauljewell
8-
ms.date: 03/28/2022
8+
ms.date: 09/01/2023
99
ms.service: azure-blob-storage
1010
ms.topic: how-to
1111
ms.devlang: csharp, python
12-
ms.custom: devx-track-csharp, devx-track-dotnet
12+
ms.custom: devx-track-csharp, devx-track-dotnet, devguide-csharp
1313
---
1414

15-
# Append data to a blob in Azure Storage using the .NET client library
15+
# Append data to an append blob with .NET
1616

1717
You can append data to a blob by creating an append blob. Append blobs are made up of blocks like block blobs, but are optimized for append operations. Append blobs are ideal for scenarios such as logging data from virtual machines.
1818

@@ -59,9 +59,9 @@ static async Task AppendToBlob(
5959
{
6060
var blockSize = (int)Math.Min(bytesLeft, maxBlockSize);
6161
var buffer = new byte[blockSize];
62-
await logEntryStream.ReadAsync(buffer, 0, blockSize);
62+
var bytesRead = await logEntryStream.ReadAsync(buffer, 0, blockSize);
6363
await appendBlobClient.AppendBlockAsync(new MemoryStream(buffer));
64-
bytesLeft -= blockSize;
64+
bytesLeft -= bytesRead;
6565
}
6666
}
6767
}

0 commit comments

Comments
 (0)