From the course: Azure Functions for Developers

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Implementing the Blob output binding in the Storage function

Implementing the Blob output binding in the Storage function - Azure Tutorial

From the course: Azure Functions for Developers

Start my 1-month free trial

Implementing the Blob output binding in the Storage function

- [Instructor] In this video, we'll see how to upload a file to the blob storage by using the blob output binding. So we have here this blob output binding right here, which is decorating this cloud blob container object. So we're going to use that but before, let's read the body from the request. So let's await the following. Let's create a new StreamReader and let's pass the Body and then let's execute ReadToEndAsync. This is the entire JSON document as a string. And now, we're going to deserialize this entire string to a PhotoUploadModel object that we have there in the Models folder. So let's use this DeserializeObject and let's pass the PhotoUploadModel type and finally, we're going to pass the body. So we have this object in this request variable and now, we're going to create a newId because I want to create a newId when uploading a file to the blob storage. So let's use this Guid. And now, let's specify the…

Contents