Async = true and output name

  • Hello,

    Using the API and setting options to:

    "options": { "reportName" : "myfile", "reports": { "async": true } }


    "options": { "Content-Disposition": "attachment; filename=myfile.pdf", "reports": { "async": true } }

    doesn't set the filename. Is there something I'm doing wrong?

  • These options are used just to set the content-disposition header.
    It is not used in reports extension.

    I've submitted this as feature request.

  • I added this to reports.js and it will do what I need for the time being:

      	app.get('/reports/:id/attachment/:filename', function (req, res, next) {
    		serveReport(req, res).then(function (result) {
    			res.setHeader('Content-Disposition', 'attachment; filename="' + req.params.filename +'"')

Log in to reply

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.