public async Task <ContentResult> UploadAsync() { try { var file = Request.Form.Files[0]; var blobName = file.FileName; MemoryStream filestream = new MemoryStream(); await file.CopyToAsync(filestream); await _imageStorageService.UploadAsync(blobName, filestream); return(Content(file.FileName)); } catch (Exception) { return(Content("Failed to uploud file.")); } }