0
            //Controller Code
            MultipartMemoryStreamProvider content = await Request.Content.ReadAsMultipartAsync();
            byte[] data = await content.Contents[0].ReadAsByteArrayAsync();
            MagickImage Image = new MagickImage(data);
            Image.Resize(200, 200);

In order to save the file to Azure Blob after resize. What should I do?

I will appreciate any help!

dlemstra
  • 7,813
  • 2
  • 27
  • 43
  • If someone has helper class where i can send HttpRequestMessage and it resize the image and return the HttpRequestMessage back with updated image. – Mitesh Prajapati Sep 24 '15 at 22:41

1 Answers1

0

This documentation here does not only show you how to do what you want, but also the proper architecture for this as well to ensure scalability. http://www.hanselman.com/blog/IntroducingWindowsAzureWebJobs.aspx

If you want to do it just straight on your ASP.net thread, then just use this code: https://azure.microsoft.com/en-us/documentation/articles/storage-dotnet-how-to-use-blobs/

David Crook
  • 2,722
  • 3
  • 23
  • 49
  • I don't need to create a webjob for this task since it would not take much time to re-size the image on the same thread. Any help on how to solve the explained scenario? – Mitesh Prajapati Sep 27 '15 at 16:25
  • How is the new answer? – David Crook Oct 02 '15 at 21:16
  • I have code ready to upload and download from blob. Here I need to help on when use upload a poc webAPI get the picture in httprequest. I want to get that picture and resize that with the help of imagemagick and then upolad it to blob. – Mitesh Prajapati Oct 08 '15 at 10:53