mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
Cleaned up the formatting, corrected some typos, updated the credentials guide to cover interactive login, and cleaned up the quick start.
1.5 KiB
1.5 KiB
Read this on the main serverless docs site
Blob Storage Trigger
Azure Functions Blob Storage trigger lets you listen on Azure Blob Storage. Full documentation can be found on azure.com.
Blob Storage Events
Blob Storage Trigger
This setup specifies that the hello function should be run when a new Blob
Storage item appears on the blob container "hello/{name}", where {name} is the
name of the blob uploaded..
Here's an example:
# serverless.yml
functions:
example:
handler: handler.hello
events:
- blob:
x-azure-settings:
name: item #<string>, default - "myBlob", specifies which name it's available on `context.bindings`
path: hello/{name}
connection: AzureWebJobsStorage #<string>, default - "AzureWebJobsStorage", App Setting/environment variable which contains Storage Account Connection String
// handler.js
'use strict';
module.exports.hello = function(context, item) {
context.log("Received item: ${item}");
context.done();
};