Can't use ICloudBlob or CloudBlockBlob for output bindings
See original GitHub issueI’m trying to use ICloudBlob
or CloudBlockBlob
for blob output bindings. According to docs this should be supported.
I get the error:
Cannot bind blob to CloudBlockBlob using access Write
or
Cannot bind blob to ICloudBlob using access Write
My function is in F#, but I’ve tried C# as well and got the same error. Possibly related to this issue
Example C# repro:
#r "Microsoft.WindowsAzure.Storage"
using Microsoft.WindowsAzure.Storage.Blob;
public static void Run(Stream myBlob, string name, TraceWriter log, CloudBlockBlob outputBlob)
{
log.Info($"C# Blob trigger function Processed blob\n Name:{name} \n Size: {myBlob.Length} Bytes");
}
{
"bindings": [
{
"name": "myBlob",
"type": "blobTrigger",
"direction": "in",
"path": "samples-workitems/{name}",
"connection": "AzureWebJobsDashboard"
},
{
"type": "blob",
"name": "outputBlob",
"path": "outcontainer/{rand-guid}",
"connection": "AzureWebJobsDashboard",
"direction": "out"
}
],
"disabled": false
}
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top Results From Across the Web
How to bind to ICloudBlob or some other (not string) type
Host: Can't bind BlobTrigger to type 'Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob'. Right now the function I'm trying out, is the one ...
Read more >Azure Blob storage trigger and bindings for Azure Functions
Learn to use the Azure Blob storage trigger and bindings in Azure Functions. ... Allow a function to write blob storage data, Output...
Read more >Cannot use CloudBlockBlob as input parameter for an ...
I'm trying to get a CloudBlockBlob instead of a Stream, whenever a new blob is stored on an azure blob storage. The reason...
Read more >Adventures with Azure Functions: Blob Storage Triggers and ...
The output binding allows you to modify and delete blob storage data in an Azure Function. I created input binding examples for the...
Read more >Azure WebJobs Storage Blobs client library for .NET
The output binding allows you to modify and delete blob storage data in an Azure Function. Please follow the input binding tutorial and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Workaround: If you set direction for the “outputBlob” binding to “inout”, this should be enabled. We’ll be working to make it easier to add inout via the UX to prevent these issues.
@leolorenzoluis maybe the container name “x” is too short and you don’t have a markup for the blob name
[Blob(“outputcontainer/{name}”, FileAccess.ReadWrite, Connection = “AzureWebJobsStorage”)]CloudBlockBlob outputBlob
worked for me