Fixes in reports (generating a CSV).

Added caching of generated images in mosaico handler.
Various other fixes.
This commit is contained in:
Tomas Bures 2019-04-22 02:41:40 +02:00
parent 055c4c6b51
commit 66702b5edc
39 changed files with 545 additions and 278 deletions

View file

@ -11,9 +11,10 @@ function nameToFileName(name) {
replace(/--*/g, '-');
}
const reportFilesDir = path.join(__dirname, '..', 'files', 'reports');
function getReportFileBase(report) {
return path.join(__dirname, '..', 'protected', 'reports', report.id + '-' + nameToFileName(report.name));
return path.join(reportFilesDir, report.id + '-' + nameToFileName(report.name));
}
function getReportContentFile(report) {
@ -28,5 +29,6 @@ function getReportOutputFile(report) {
module.exports = {
getReportContentFile,
getReportOutputFile,
nameToFileName
nameToFileName,
reportFilesDir
};