Describe the bug
Last friday i started to use wikijs. Unfortunatelly I cannot upload files larger than 5MB. More precisely: files are uploaded, the success message shows up, they are present in the database table but not on the disk.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Uploaded file is accessible
Screenshots
Check this video for more details
Host Info (please complete the following information):
"You most likely have a reverse proxy in front (nginx / apache) with a default limit of 5 MB. You need to modify that limit as well."
No proxy, this is served straight from node: node server. Besides if it was a proxy problem, I would most likely see some errors. On the video you can clearly see that the request reached the wiki.
This isn't a proxy issue. Most likely a mariaDB blob size limit issue. Can you check in the assetsData table, with the associated ID if the row exists? Looks like the asset was created properly but not its content.
Try to increase the allowed size on your database as explained here:
There was no corresponding row in the assetsData table. max_allowed_packet was set to 16MB. I've changed it to 32MB. Now uploading is working properly. Just to satisfy my curiosity, why files are stored in database and on disk? Also I see data/cache folder ...
The database is the "source of truth". Pages and assets are only cached to disk to avoid pinging the database on every request. This allows for multiple instances to run simultaneously (e.g. in a Kubernetes cluster) without having to care about disk syncing between instances.
Today's databases are more than capable of storing large files efficiently.
Ok, thanks a lot @NGPixel
Most helpful comment
The database is the "source of truth". Pages and assets are only cached to disk to avoid pinging the database on every request. This allows for multiple instances to run simultaneously (e.g. in a Kubernetes cluster) without having to care about disk syncing between instances.
Today's databases are more than capable of storing large files efficiently.