Skip to content

Instantly share code, notes, and snippets.

@GeradeDev
Created July 29, 2020 12:08
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save GeradeDev/10f33165bc3f7798e7da4695fd144326 to your computer and use it in GitHub Desktop.
//Generate image
var memoryStream = GenerateBlogPostMetaCardWithDescription("{ " + metaCardDescription.PostMetaTagImageDescription + " }");
//Create the image in Blob Storage
CloudBlockBlob blob = blobContainer.GetBlockBlobReference($"{metaCardDescription.PostTitle}.png");
blob.Properties.ContentType = "image/png";
blob.UploadFromStream(memoryStream);
log.LogInformation($"Post image card generation for post {metaCardDescription.PostTitle} was successful. Image was uploaded to Blob Storage");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment