Closed
Description
Hello folks! on the previous versions of te Blob client SDK, it was easy to set the Content-Type
of a blob using the blob reference.
Now I see that the new (v12) Azure.Storage.Blobs BlobClient
can call GetPropertiesAsync()
to get a BlobProperties
object but I can't find how to set it.
So, how to properly set the file content type when uploading the blob?
I've found out await blob.SetHttpHeadersAsync(new BlobHttpHeaders { ContentType = GetContentType(fileType) });
but that requires another call to the the storage... Isn't there a better way for doing that while uploading the file?
Thanks!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment