Skip to content
Snippets Groups Projects
Commit afaf4840 authored by Xiao Gui's avatar Xiao Gui
Browse files

bugfix: broken post stamp links

parent ac5525da
No related branches found
No related tags found
No related merge requests found
......@@ -129,6 +129,12 @@ fs.readdir(RECEPTOR_PATH, (err, files) => {
datasetsRouter.get('/previewFile', cacheMaxAge24Hr, (req, res) => {
const { file } = req.query
const filePath = previewFileMap.get(file)
// even though req.url is modified, req.query is not
// for now, just serve non encoded image
res.removeHeader('Content-Encoding')
if (filePath) {
fs.createReadStream(filePath).pipe(res)
} else {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment