예제 #1
0
        public async Task <ActionResult> DownloadDocument(int fileId)
        {
            var document = await _documentService.GetDocumentByFileIdAsyncTask(fileId);

            var cd = new ContentDisposition
            {
                FileName = document.FileName,
                Inline   = false
            };

            Response.AppendHeader("Content-Disposition", cd.ToString());
            return(File(document.DocumentFile, _documentFactory.GetMimeTypeByFormatType(document.FileType)));
        }