1
votes

I have built an Azure Webjob that takes a queue trigger and an blob reference as input, processes the file and creates multiple output blob files (it's breaking a PDF into individual pages). In order to output the multiple blobs, I have code in the job that explicitly creates the storage/container connection and does the output. It would be cleaner to let webjobs handle this if it's possible using attributes.

Is there a way to output multiple blobs to a container? I can output multiple queue messages using the QueueAttribute and an ICollector, but I don't see if that's possible with a Blob (like a container reference where I can send multiple blobs). Thanks.

1

1 Answers

2
votes

Correct - BlobAttribute does not support an ICollector binding. In the current beta release, we have added some new bindings that might help you a bit. For example, you can now bind to a CloudBlobContainer and you could use that to create additional blobs. See the release notes for more details.

Another possibility would be for you to use the IBinder binding (example here). It allows you to imperatively bind to a blob. You could do that multiple times in your function.