Uploads to a wiki should be stored inside the wiki git repository
Editing wiki pages doesn't upload attached files into the repository, but instead uses the
uploads directory. This is inconsistent with local Gollum behavior, prevents wikis from being rendered locally and makes it very hard to transport. We should treat the images as content of the repository.
Images added through the wiki editor interface should commit the image to the Git repository, instead of being uploaded outside the repository. The image should be committed to the
uploads folder in the root of the repository for consistency with Gollum (e.g
--allow-uploads <dir> mode).
- Support for LFS in wiki repositories https://gitlab.com/gitlab-org/gitlab-ce/issues/43721
Links / references
https://github.com/gollum/gollum#configuration – see
Original bug report
What is the current bug behavior?
Attaching the file inserts a markdown link pointing to
/uploads/… (which gets expanded during rendering to contain the repo URL, so it will look like
Contrary to normal gollum behaviour when executed locally, the file is not uploaded inside the repository, but hosted somewhere inside the gitlab installation, therefore not included in local checkouts.
What is the expected correct behavior?
When attaching files, they should also be added to the repository together with the commit changing the markdown, at the
/uploads/ directory inside the git repo root, as done by gollum too (in
--allow-uploads dir mode).
Requests to URLs pointing to $wiki_url/uploads/ should serve files stored there.
This will fix the currently inconsistent behaviour of not being able to access files being locally uploaded via a local git clone and via running the local gollum editor.
--allow-uploads page mode might be supported via a project wiki setting