An error occurred while loading the file. Please try again.
-
Athanasios authored9a2f0ed2
const config = require('../config');
const fs = require('fs');
const handle = (req, res) => {
let resourse = `${config.BASE_DIR}/scenelayers/${req.params.layer}/layers/0/${config.FOLDER_INDEX.SCENELAYER}`;
if (!fs.existsSync(resourse)) throw new Error("not found");
res.set({
'Content-Type': 'application/json',
'Content-Encoding': 'gzip'
});
res.sendFile(resourse);
};
module.exports = handle;