Exemplo n.º 1
0
        public async Task <IActionResult> CreateDepositInvoiceDocumentAsync(int id)
        {
            await _documentGenerationManager.CreateAndStoreDepositInvoiceDocumentAsync(id);

            // TODO return download location in Location header
            return(NoContent());
        }
        public async Task <IActionResult> CreateDepositInvoiceDocumentAsync(int id, [FromQuery] string language)
        {
            var fileStream = await _documentGenerationManager.CreateAndStoreDepositInvoiceDocumentAsync(id, language);

            var file = new FileStreamResult(fileStream, "application/pdf");

            file.FileDownloadName = fileStream.Name;
            return(file);
        }