@Rob Caplan - MSFT Thanks for your reply and suggestions for further reading.
I was able to find a way to set the ContentType:
// 5 Setting ContentType
// Get the existing properties
BlobProperties properties = await blobClient.GetPropertiesAsync();
string CopyContentType = "";
string extension = Path.GetExtension(path).Substring(1);
if (extension == "mp4")
{
//blobClient.Properties.ContentType = "video/mp4";
CopyContentType = "video/mp4";
}
else if (extension == "png")
{
//blobClient.Properties.ContentType = "image/png";
CopyContentType = "image/png";
}
BlobHttpHeaders headers = new BlobHttpHeaders
{
// Set the MIME ContentType every time the properties
// are updated or the field will be cleared
ContentType = CopyContentType,
ContentLanguage = "en-us",
// Populate remaining headers with
// the pre-existing properties
CacheControl = properties.CacheControl,
ContentDisposition = properties.ContentDisposition,
ContentEncoding = properties.ContentEncoding,
ContentHash = properties.ContentHash
};
// Set the blob's properties.
await blobClient.SetHttpHeadersAsync(headers);
A lot of this was taken from https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-properties-metadata?tabs=dotnet
From my perspective, it looks like it should work. There are no compile errors. But I have a few more things to switch from SDK11 to SDK12. Then I can test it.
@Sumarigo-MSFT I understand that you may be able to help me out here.
Is there a replacement for BlobRequestOptions?
Within BlobRequestOptions there is a reference to ExponentialRetry. What replaces ExponentialRetry?
Is there a replacement for OperationContext? Do I even need it?
Thanks!