Resizing images - Event Grid, Functions, Storage
- Print
- DarkLight
- PDF
Resizing images - Event Grid, Functions, Storage
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback!
#ServerlessTips - Event Grid
Author: Steef-Jan Wiggers Azure MVP
In the previous Event Grid Tip, we discussed the ability of Event Grid in collaboration with other Serverless services like Azure Functions could support a fan-in/fan-out scenario. By uploading images to a blob container in an Azure storage account, you can trigger a process of image processing, for instance, resizing the uploaded pictures and store them in another container.
Uploading images to a blob container in a storage account (version 2) results in a blobCreated event; this event adheres to the Event Grid schema, and would look like:
{
"topic": "/subscriptions/0bf166ac-9aa8-4597-bb2a-a845afe01415/resourceGroups/RG_LicensePlates_Demo/providers/Microsoft.Storage/storageAccounts/licenseplatesstorage",
"subject": "/blobServices/default/containers/images/blobs/LicensePlate1.png",
"eventType": "Microsoft.Storage.BlobCreated",
"eventTime": "2018-06-05T08:35:26.2778593Z",
"id": "2c6f7c22-201e-00b7-0aa8-fca7ce06e319",
"data": {
"api": "PutBlob",
"clientRequestId": "32a51839-6bf5-44d6-acfe-7d284229988c",
"requestId": "2c6f7c22-201e-00b7-0aa8-fca7ce000000",
"eTag": "0x8D5CABF497519C6",
"contentType": "application/octet-stream",
"contentLength": 41860,
"blobType": "BlockBlob",
"url": "https://licenseplatesstorage.blob.core.windows.net/images/LicensePlate1.png",
"sequencer": "000000000000000000000000000008BC0000000003fd850f",
"storageDiagnostics": {
"batchId": "fbb4e831-82b2-4e64-b0e5-0735449f9cb7"
}
Was this article helpful?