更新时间:2023-02-14 20:52:44
您可以将其设置如下,
await blobClient.UploadAsync(stream, true, default);
await blobClient.SetHttpHeadersAsync(new BlobHttpHeaders
{
ContentType = contentType
});
编辑:如评论中所述,一种有效的方法可通过以下一种方法完成操作,
As mentioned in the comment, the efficient way to do the same with a single method as follows,
await blobClient.UploadAsync(ms, new BlobHttpHeaders{ ContentType = "text/plain"});