Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block glglak

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Get Images from Blob Storage by URL
public async Task<byte[]> GetImageAsByteArray(string imageFilePath)
CloudStorageAccount cloudStorageAccount = CloudStorageAccount.Parse(connectionStorage);
CloudBlobClient cloudBlobClient = cloudStorageAccount.CreateCloudBlobClient();
CloudBlobContainer cloudBlobContainer = cloudBlobClient.GetContainerReference (containerReferrence);
CloudBlob cloudBlob = cloudBlobContainer.GetBlobReference(new CloudBlockBlob(new Uri(imageFilePath)).Name);
await cloudBlob.FetchAttributesAsync();
long fileByteLength = cloudBlob.Properties.Length;
Byte[] myByteArray = new Byte[fileByteLength];
View Upload to blob storage
private async Task<string> UploadBlobStorage(IFormFile filepayupload)
string url = string.Empty;
if (filepayupload != null)
using (var stream = new MemoryStream())
await filepayupload.CopyToAsync(stream);
var streamArray = stream.ToArray();
You can’t perform that action at this time.