Fix pdf tmp path is missing a folder slash before timestamp

This commit is contained in:
Cheng-Han, Wu 2016-06-17 16:33:58 +08:00
parent a6a107eab9
commit a125f80535
1 changed files with 1 additions and 1 deletions

View File

@ -296,7 +296,7 @@ function actionPDF(req, res, note) {
if (!fs.existsSync(config.tmppath)) {
fs.mkdirSync(config.tmppath);
}
var path = config.tmppath + Date.now() + '.pdf';
var path = config.tmppath + '/' + Date.now() + '.pdf';
markdownpdf().from.string(body).to(path, function () {
var stream = fs.createReadStream(path);
var filename = title;