Open ekjuanrejon opened 1 year ago
@ekjuanrejon You can control the content-type
associated to the blob by setting the contentType
metadata when invoking the binding.
using Dapr.Client;
var daprClient = new DaprClientBuilder().Build();
Console.WriteLine("Invoking binding...");
await daprClient.InvokeBindingAsync(
"blob-storage",
"create",
new { data = "Hello, World!" },
new Dictionary<string, string>
{
{ "blobName", "hello.txt" },
{ "contentType", "application/json" }
});
Console.WriteLine("Done!");
In the above example, the blob will be associated with the application/json
content type (vs. a default of application/octet-stream
, if no metadata were set).
Let us know if you're not finding otherwise.
How to set ContentType header when using azure blob storage binding?