public async Task <IActionResult> CreateInvoiceDocumentAsync(int id) { await _documentGenerationManager.CreateAndStoreInvoiceDocumentAsync(id); // TODO return download location in Location header return(NoContent()); }
public async Task <IActionResult> CreateInvoiceDocumentAsync(int id, [FromQuery] string language) { var fileStream = await _documentGenerationManager.CreateAndStoreInvoiceDocumentAsync(id, language); var file = new FileStreamResult(fileStream, "application/pdf"); file.FileDownloadName = fileStream.Name; return(file); }