Import images/files not working #7971
Replies: 3 comments
-
|
Quick follow up, I've opened up permissions on the /var/wikijs/data/repo and /var/wikijs/data/repo/attachments directories, re-imported everything as described above and Rerendered all pages with no change in the image presentation. |
Beta Was this translation helpful? Give feedback.
-
|
Is there some anomaly due to the images being held in the database or how they're brought into the system maybe? |
Beta Was this translation helpful? Give feedback.
-
|
Found the issue to be the directory structure on the server side not in the databse. Attachments/images are stored (in my case) in /var/wikijs/data/repo/attachments/x/y/z |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have had great success importing pages into wiki.js 2.5.307 running on Node.js 20.11.0 and PostgreSQL 16.8 by placing the html files in /var/wikijs/data/repo and configuring the local storage to point at that directory then clicking the "import everything" button at the bottom of the local file system page. All the html pages come into wikijs and display properly. I have items in /var/wikijs/data/repo/attachments that I've tried to pull in as well.

These attachments can be found in the database with the db query: select * from assets;
These attachments in the db all have various sizes and details:
In the web interface when editing a page when I click "Insert Asset" I can roll through the directory structure created by my import and find the images/attachments I am looking for. The images of 2023.jpg and firehose.jpg were added manually via the web interface not from the import.

When I attempt to add these images to the page (or look where they should be from the original page import) I find the image name, not the image.

I have manually uploaded a couple images to validate that images do work and I've got the syntax correct on the images that should have came over with the import. In this image you can see the two working images that I manually added and the jenkins.png that was imported and is not working.
Lastly if I go to the image URL directly I can see the images I manually uploaded, but cannot see the ones that should have imported.
https://wikijs.xxxxxxxxxxxx/attachments/Unclass/Tools/Jenkins/Installation/2023.jpg shows the image I am expecting
https://wikijs.xxxxxxxxxxxx/attachments/Unclass/Tools/Jenkins/Installation/jenkins.png shows 'Not Found'
I have checked that the items in /var/wikijs/data/repo/attachments are valid and viewable before and after the import.
Any assistance would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions