public async Task <FileDownload> GetDownloadByDocument(Guid documentId) { var file = await _fileRepository.GetByDocumentId(documentId); var stream = await _fileProvider.DownloadFileToStream(file.FileId); return(new FileDownload(stream, file.ContentType, file.FileName)); }