public async Task <IActionResult> Index(string name) { var drive = await _explorer.GetDriveByName(name); ViewBag.DriveName = name; var children = await _explorer.GetDriveRoot(drive.Id); var items = children.Select(item => DriveItemViewModel.Create(item, drive.Id)); return(View("Folder", items)); }
public async Task <IActionResult> Folders(string name, string id) { var drive = await _explorer.GetDriveByName(name); var folderItems = await _client.Me.Drives[drive.Id].Items[id].Children .Request() .GetAsync(); var models = folderItems.Select(item => DriveItemViewModel.Create(item, drive.Id)); return(View("Folder", models)); }