public async Task <FileResult> Download(Guid documentId)
        {
            var dbContext = new DashDocsContext();
            var document  = await dbContext.Documents.SingleAsync(d => d.Id == documentId);

            var blobStorageService = new BlobStorageService();
            var content            = await blobStorageService.DownloadDocumentAsync(documentId, DashDocsClaims.CustomerId);

            return(File(content.Value, System.Net.Mime.MediaTypeNames.Application.Octet, content.Key));
        }
示例#2
0
        public async Task<FileResult> Download(Guid documentId)
        {
            var dbContext = new DashDocsContext();

            var document = await dbContext.Documents.SingleAsync(d => d.Id == documentId);
            var blobStorageService = new BlobStorageService();
            var content = await blobStorageService.DownloadDocumentAsync(documentId, Guid.Parse("48CC71AE-22E9-4CA3-96AD-5D53D38215AE"));
            content.Value.Position = 0;
            return File(content.Value, System.Net.Mime.MediaTypeNames.
            Application.Octet, content.Key);
        }
示例#3
0
        public async Task <FileResult> Download(Guid documentId)
        {
            Guid customerId = Guid.Parse("82CEAD1F-E3FA-4DAB-BFFA-276845FB7E72");

            var dbContext = new DashDocsContext();
            var document  = await dbContext.Documents.SingleAsync(d => d.Id == documentId);

            var blobStorageService = new BlobStorageService();
            var content            = await blobStorageService.DownloadDocumentAsync(documentId, customerId);

            return(File(content.Item1, System.Net.Mime.MediaTypeNames.Application.Octet, content.Item2));
        }