コード例 #1
0
ファイル: DocumentService.cs プロジェクト: lulzzz/MyPortal
        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));
        }