Hi,
I recently increased version of jsreport from 1.7.0 to 2.3.0 on my server due to some security fixes available in latest version's.
I used jsreport-s3-storage with some extra customization -
- For picking a path which I was sending in headers to upload reports to s3 and
- Return a response with the file path (s3 url) by which report could be downloaded example -
https://xyz.com/reports/<app_name>/<report_name>
I can see that there is an official aws s3 uploader available now, would like to know how to achieve above 2 points in this new module.
Can we update response header in the function write: (defaultBlobName, buffer, request, response)
?
If not what can I do to return an s3 file path where reports are getting stored ?
Also, I ran official aws s3 uploader with config as told in guide. For some reason there is nothing happening in the code I placed a console.log in init function which is being called. But write function is not getting triggered.
Am I doing something wrong ? Here is the output from my jsreport terminal -
2019-01-04T08:17:03.731Z - debug: Base url not specified, skipping its injection.
2019-01-04T08:17:03.731Z - debug: Rendering engine handlebars
2019-01-04T08:17:04.007Z - debug: Compiled template not found in the cache, compiling
2019-01-04T08:17:04.013Z - debug: Executing recipe xlsx
2019-01-04T08:17:04.014Z - debug: Parsing xlsx content
2019-01-04T08:17:04.044Z - debug: Zipping prepared xml files into /tmp/jsreport/autocleanup/1e4236c0-0ff9-11e9-85d6-67831e59f236.xlsx
2019-01-04T08:17:04.091Z - debug: Successfully zipped now.
2019-01-04T08:17:04.095Z - debug: Skipping storing report.
2019-01-04T08:17:04.099Z - info: Rendering request 1 finished in 515 ms