robinrodricks / FluentStorage

A polycloud .NET cloud storage abstraction layer. Provides Blob storage (AWS S3, GCP, FTP, SFTP, Azure Blob/File/Event Hub/Data Lake) and Messaging (AWS SQS, Azure Queue/ServiceBus). Supports .NET 5+ and .NET Standard 2.0+. Pure C#.
MIT License
263 stars 33 forks source link

Setting Content-Type of an Azure blob #47

Open damienturnbull opened 9 months ago

damienturnbull commented 9 months ago

When uploading a jpg file as an Azure Blob using WriteAsync, the file is created in Azure with a Content-Type set to 'application/octet-stream'. There doesn't seem be any support for setting the Content-Type to 'application/image/jpeg'. Or is there?

njannink commented 6 months ago

would be nice if the behavior of ContentType would be equal over all storage implementations. Eg for local storage you will need to add it as Metadata, but for Azure storage its in the Properties dictionary.

And indeed you cannot set the ContentType header for Azure storage.