Uploading to Azure With ASP.NET Core and Angular

preview_player
Показать описание
Building a modern web application with a robust Angular client backed by the power of Azure and ASP.NET Core sounds like a difficult mix of bleeding edge technologies, but in actuality you might surprised at how simple it is to set up. In this video we'll learn how to use the Kendo UI for Angular Upload component to create a stylish and functional UI for uploading files to Azure Blob Storage through a ASP.NET Core controller action.

Рекомендации по теме
Комментарии
Автор

nice and easy
wish to see the next update for uploading chunk files
how to do AppendToFile on the service.
thanks

אלוניא.מערכותמידעבעמ
Автор

Instead of using kendo, what can i do?

jassersaanoun
Автор

public async Task<string> UploadFile(IFormFile photo)
{
string imageFullPath = null;
// Retrieve storage account from connection string.



string accountName = "test";
string accountKey =
StorageCredentials creds = new StorageCredentials(accountName, accountKey);
CloudStorageAccount account = new CloudStorageAccount(creds, useHttps: true);

// HttpPostedFileBase photo = new HttpPostedFileBase();
// Create the blob client.
CloudBlobClient blobClient =

// Retrieve reference to a previously created container.
CloudBlobContainer container = Folder Path in Azure Blob");

// Retrieve reference to a blob named "myblob".
CloudBlockBlob blockBlob =

= photo.ContentType;


using(var filestream = photo.OpenReadStream())
{
await

}



// var fileBytes = file.Data;
// await blockBlob.UploadFromByteArrayAsync(fileBytes, 0, fileBytes.Length);

return imageFullPath;
}

premchand
join shbcf.ru