log font path to make sure it's working

pull/1/head
ansuz 6 years ago
parent 802075f83c
commit 9d0e0a4efa

@ -215,6 +215,7 @@ var FONT_NAME_MAP = {};
app.use("/common/onlyoffice/fonts/odttf/:name", function (req, res) { app.use("/common/onlyoffice/fonts/odttf/:name", function (req, res) {
var name = req.params.name.replace(/\.js$/, '').toLowerCase(); var name = req.params.name.replace(/\.js$/, '').toLowerCase();
var path = Path.join('./www/common/onlyoffice/fonts/odttf/', name); var path = Path.join('./www/common/onlyoffice/fonts/odttf/', name);
console.log(path);
Fs.createReadStream(path).pipe(res).on('error', function (e) { Fs.createReadStream(path).pipe(res).on('error', function (e) {
console.error(e); console.error(e);
res.status(404).send('No such font'); res.status(404).send('No such font');

Loading…
Cancel
Save