fix pdf export + add download_as_pdf template string and action (#110)

* fix pdf export
add download_as_pdf template string and action

* after pdf export click
- close dropdown
- open in new tab

* proper fix function
This commit is contained in:
banglashi
2020-11-02 20:07:15 +01:00
committed by GitHub
parent 7c6d5c83db
commit 6257e3410e
8 changed files with 15 additions and 3 deletions

View File

@@ -114,7 +114,12 @@ router.get('/pdf', function(req, res, next) {
res.status(201).json({
url: url
});
fs.unlink(local_path);
fs.unlink(local_path, function(){
if (err) console.log('unlink', err);
else {
console.log('unlink', local_path);
}
});
});
}, (err) => {
res.status(500).json({