FluentStorage icon indicating copy to clipboard operation
FluentStorage copied to clipboard

FluentStorage.Azure.Blobs.WriteAsync does not support "append=true"

Open gentledepp opened this issue 1 year ago • 2 comments

Even though the method signature suggests it, AzureBlobStorages

public async Task WriteAsync(
      string fullPath,
      Stream dataStream,
      bool append = false,
      CancellationToken cancellationToken = default (CancellationToken))

setting append to true still just overwrites any preexisting blob.

This is because it uses BlockBlobClient.UploadAsync internally, where the documentation clearly states:

The UploadAsync(Stream, BlobUploadOptions, CancellationToken) operation overwrites the contents of the blob, creating a new block blob if none exists. Overwriting an existing block blob replaces any existing metadata on the blob.

gentledepp avatar Sep 18 '24 11:09 gentledepp