更新时间:2023-02-14 20:33:45
可以如下设置,
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"});