The Storage SDK does not provide this, but is a major feature of the new WebJobs SDK. There is an attribute [BlobInput], which allows you to specify a container for listening, and includes an efficient blob listener that will send a method when new drops are detected. There are several examples of listening to blob: http://blogs.msdn.com/b/jmstall/archive/2014/02/18/azure-storage-bindings-part-1-blobs.aspx
Here's a usage example:
public static void CopyWithStream(
[BlobInput("container/in/{name}")] Stream input,
[BlobOutput("container/out1/{name}")] Stream output
)
{
Debug.Assert(input.CanRead && !input.CanWrite);
Debug.Assert(!output.CanRead && output.CanWrite);
input.CopyTo(output);
}
And the blob listener is here:
JobHost host = new JobHost(acs);
host.RunAndBlock();
source
share