Skip to content

Commit

Permalink
include content type for json values in blob storage
Browse files Browse the repository at this point in the history
  • Loading branch information
JhontSouth committed Jan 18, 2024
1 parent 744e5ef commit c04a8b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libraries/Microsoft.Bot.Builder.Azure.Blobs/BlobsStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,10 @@ internal BlobsStorage(BlobContainerClient containerClient, JsonSerializer jsonSe

await streamWriter.FlushAsync().ConfigureAwait(false);
memoryStream.Seek(0, SeekOrigin.Begin);
var blobHttpHeaders = new BlobHttpHeaders();
blobHttpHeaders.ContentType = "application/json";

await blobReference.UploadAsync(memoryStream, conditions: accessCondition, transferOptions: _storageTransferOptions, cancellationToken: cancellationToken).ConfigureAwait(false);
await blobReference.UploadAsync(memoryStream, conditions: accessCondition, transferOptions: _storageTransferOptions, cancellationToken: cancellationToken, httpHeaders: blobHttpHeaders).ConfigureAwait(false);
}
catch (RequestFailedException ex)
when (ex.Status == (int)HttpStatusCode.BadRequest
Expand Down

0 comments on commit c04a8b2

Please sign in to comment.