Example #1
0
        private static PictureResizeRequest GetResizeRequest(HttpRequest req)
        {
            string requestBody = new StreamReader(req.Body).ReadToEnd();
            PictureResizeRequest pictureResizeRequest = JsonConvert.DeserializeObject <PictureResizeRequest>(requestBody);

            return(pictureResizeRequest);
        }
Example #2
0
 private static void SetAttachmentAsContentDisposition(ICloudBlob resizedPhotoCloudBlob,
                                                       PictureResizeRequest pictureResizeRequest)
 {
     resizedPhotoCloudBlob.Properties.ContentDisposition =
         $"attachment; filename={pictureResizeRequest.RequiredWidth}x{pictureResizeRequest.RequiredHeight}.jpeg";
 }