Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uploaded files do not display in pages in wikijs #3041

Closed
ghost opened this issue Feb 7, 2021 · 1 comment
Closed

uploaded files do not display in pages in wikijs #3041

ghost opened this issue Feb 7, 2021 · 1 comment
Labels

Comments

@ghost
Copy link

ghost commented Feb 7, 2021

Describe the bug
Can't access to uploaded files: path must be absolute or specify root to res.sendFile

0|server | 2021-02-06T12:50:35.499Z [MASTER] error: path must be absolute or specify root to res.sendFile

Equals to this problem: #2463 and #2930

To Reproduce
Steps to reproduce the behavior:
Administration -> Utilities -> Flush Pages and Assets Cache

Expected behavior
These videos and pictures do not display

Screenshots
image

Report

Host Info (please complete the following information):
OS: Linux - Debian (buster) 10 x64
Wiki.js version: 2.5.159
Database engine: PostgreSQL 11.4

@ghost ghost changed the title Assess to uploaded files uploaded files do not display in pages in wikijs Feb 7, 2021
@ghost
Copy link
Author

ghost commented Mar 7, 2021

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/' })
}

@NGPixel NGPixel closed this as completed Mar 21, 2021
@requarks requarks locked and limited conversation to collaborators Mar 21, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

1 participant