Skip to content

Commit d6ebfe0

Browse files
committed
Updated per GitHub issue #44973
1 parent 6579d65 commit d6ebfe0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

articles/storage/blobs/storage-quickstart-blobs-dotnet.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ From the project directory:
8181
Here's the code:
8282

8383
```csharp
84-
using Azure.Storage;
8584
using Azure.Storage.Blobs;
8685
using Azure.Storage.Blobs.Models;
8786
using System;
@@ -177,7 +176,7 @@ The following code snippet:
177176

178177
1. Creates a text file in the local *data* directory.
179178
1. Gets a reference to a [BlobClient](/dotnet/api/azure.storage.blobs.blobclient) object by calling the [GetBlobClient](/dotnet/api/azure.storage.blobs.blobcontainerclient.getblobclient) method on the container from the [Create a container](#create-a-container) section.
180-
1. Uploads the local text file to the blob by calling the [​Upload​Async](/dotnet/api/azure.storage.blobs.blobclient.uploadasync) method. This method creates the blob if it doesn't already exist, and overwrites it if it does.
179+
1. Uploads the local text file to the blob by calling the [​Upload​Async](/dotnet/api/azure.storage.blobs.blobclient.uploadasync#Azure_Storage_Blobs_BlobClient_UploadAsync_System_IO_Stream_System_Boolean_System_Threading_CancellationToken_) method. This method creates the blob if it doesn't already exist, and overwrites it if it does.
181180

182181
Add this code to the end of the `Main` method:
183182

@@ -197,7 +196,7 @@ Console.WriteLine("Uploading to Blob storage as blob:\n\t {0}\n", blobClient.Uri
197196

198197
// Open the file and upload its data
199198
using FileStream uploadFileStream = File.OpenRead(localFilePath);
200-
await blobClient.UploadAsync(uploadFileStream);
199+
await blobClient.UploadAsync(uploadFileStream, true);
201200
uploadFileStream.Close();
202201
```
203202

0 commit comments

Comments
 (0)