error: path must be absolute or specify root to res.sendFile #5223
Unanswered
Hagbrain
asked this question in
Error / Bug Report
Replies: 1 comment 1 reply
-
I think the file is "server/models/assets.js" inside your wiki |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Unable to view images - res.SendFile
Unable to view images after update. Console shows an error and the page just shows the filename instead of an image.
[MASTER] error: path must be absolute or specify root to res.sendFile
Theres a solution
Suggested solution:
this line:
await sendFile(cachePath, { dotfiles: 'deny', root: "/opt/wiki/" })
replace with this line:
try {
await sendFile(cachePath, { dotfiles: 'deny' })
}catch (error) {
await sendFile(cachePath, { dotfiles: 'deny', root: '/opt/wiki/' })
}
But what file do i need to edit?
Runing lastest wikijs dockerized
Kind Regards
Dom
Beta Was this translation helpful? Give feedback.
All reactions