public async Task <IActionResult> Download([BindRequired] Guid id) { var result = await _service.Download(id, _loginInfo.AccountId); if (result.Successful) { var file = result.Data; return(PhysicalFile(file.FilePath, file.MediaType, file.Name, true)); } return(new JsonResult(result)); }