New topic Closed topic
avatar image
1
Send PDF file to user's browser
By Created , last editted

Hi all,

A very simple question, but I don't get it working. I have an endpoint that is generating a report file. A user gets to this endpoint by a standard HTML <a href="/generate-report"  target="_blank">Generate report</a> link.

The action flow linked to the GET endpoint is as follows:

1. Create event (create report record)

2. Generate PDF file (based on that record)

3. Redirect the user to the PDF file just generated, settings:

Kind: Redirect web page
Response code: 302 (I also tried the other response codes)
Redirect URL: var:report.report

However, when a user clicks on this link, the report is rendered in flat text in the user's browser instead of downloading the PDF file. In the backend, the report has actually been created so that is working. What can I do so the GET endpoint sends the user the actual PDF file?

Many thanks in advance!

Arno


Hi all,

A very simple question, but I don't get it working. I have an endpoint that is generating a report file. A user gets to this endpoint by a standard HTML <a href="/generate-report"  target="_blank">Generate report</a> link.

The action flow linked to the GET endpoint is as follows:

1. Create event (create report record)

2. Generate PDF file (based on that record)

3. Redirect the user to the PDF file just generated, settings:

Kind: Redirect web page
Response code: 302 (I also tried the other response codes)
Redirect URL: var:report.report

However, when a user clicks on this link, the report is rendered in flat text in the user's browser instead of downloading the PDF file. In the backend, the report has actually been created so that is working. What can I do so the GET endpoint sends the user the actual PDF file?

Many thanks in advance!

Arno

Answers
Sort by:

This topic is closed.