Microsoft Azure Developer Associate AZ-204 Practice Question
You are using the Azure.Storage.Blobs v12 SDK from a .NET 6 worker service. After uploading a 5-GB block blob you discover that the ContentType header is missing. You must update the blob so that future downloads include the correct MIME type without transferring the blob content again to storage. Which method should you call?
Call BlobContainerClient.SetMetadataAsync("video/mp4") on the container
Call BlobClient.UploadAsync(stream, new BlobUploadOptions { HttpHeaders = new BlobHttpHeaders })
Call BlobServiceClient.SetPropertiesAsync() to set the service's default ContentType
SetHttpHeadersAsync on a BlobClient sends only the header values and associated request metadata to the service. The underlying blob data is not re-uploaded, so the operation is fast and bandwidth-efficient. UploadAsync always transfers the stream again, so it is unnecessary and costly for a 5-GB file. SetMetadataAsync can change user-defined metadata but cannot modify standard HTTP headers such as ContentType. SetPropertiesAsync is available only on BlobServiceClient to change service-level settings and cannot target an individual blob. Therefore, calling SetHttpHeadersAsync with a BlobHttpHeaders object that includes the desired ContentType is the correct approach.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the purpose of the SetHttpHeadersAsync method?
Open an interactive chat with Bash
How does SetMetadataAsync differ from SetHttpHeadersAsync?
Open an interactive chat with Bash
Why is UploadAsync inefficient for modifying the ContentType of a blob?
Open an interactive chat with Bash
Microsoft Azure Developer Associate AZ-204
Develop for Azure storage
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .