'Where can I manage files uploaded to wiki of a Gitlab.com project?
I have uploaded some files to my Gitlab repository on "gitlab.com" while creating wiki for my private project.
Now my questions are:
- Can I see list of the uploaded files?
- Is there any way to remove some of them?
- Why permission of uploaded file is public? Can I change it to private?
Current version of gitlab is Enterprise Edition 8.9.4-ee.
Solution 1:[1]
Attached files trough the wiki editor are uploaded to /uploads/. As of GitLab version 8.9.0 you are unable to manage these files (i.e. deleting them).
If you want to manage those files yourself you can clone the wiki as repository. You can find the clone URL in Wiki -> Git Access. It should look something like this: git@<link to gitlab>:<group/user name>/<project name>.wiki.git. There you can put your images and link them within your wiki. The link to the image is relative to the repo root so if your image image.png is in the root folder you can link it with markdown like this.
Permission wise these files will only be visible to Users which have atleast Guest access to your project, even if they have a direct link.
Solution 2:[2]
Wikis are based on Git repositories, so you can clone them locally and edit them like you would do
Actually... See GitLab 14.0 (June 2021)
Edit wiki pages with the WYSIWYG Markdown editor
Edit wiki pages with the WYSIWYG Markdown editor
Editing wiki content could be so much easier! Many GitLab wikis use Markdown formatting, and for some users, Markdown is a barrier to efficient collaboration. In this release, you now have access to a rich, modern Markdown editing experience in your wiki, so you can edit with confidence.
Instant feedback and visual editing tools help make wiki editing more intuitive, and remove barriers to collaboration. GitLab saves the changes as Markdown when you’re done, so users who want to edit the Markdown directly can do so. You can even type Markdown into the new editor and it will automatically format the text as you type.
GitLab 14.0 introduces the Content Editor into the Wiki with support for most of the basic Markdown content types like headers, bold and italic text, lists, code blocks, and links. Full support for the entire GitLab Flavored Markdown specification will arrive in upcoming releases. We also plan to make the Content Editor available in other areas of GitLab in the future. We welcome input on this early MVC in this feedback issue.
See Documentation and Epic.
And yes, that include page deletion.
Alternatively:
See GitLab 14.2 (August 2021)
Upload and attach files in the new wiki editor
GitLab 14.1 introduced the ability to upload and insert images into the new wiki content editor.
Now in GitLab 14.2, you can upload and attach
.zip,.txt, and other binary files in the same way.
This brings us one step closer to feature parity with the classic wiki editor, and unlocks additional ways for you to collaborate on rich content in your wiki pages.See Documentation and Issue.
See GitLab 14.9 (March 2022)
Render pasted Markdown in the wiki WYSIWYG editor
Markdown content destined for your GitLab wiki is sometimes created outside of GitLab.
In the “classic” wiki editor, you can paste valid Markdown with no problem, because you are working with the raw source. The page only renders when you submit the content.
In the wiki WYSIWYG editor, however, your clipboard’s content might have been pasted in as plain text, forcing you to manually reformat every line to remove Markdown syntax and re-format it using the WYSIWYG tools.
In GitLab 14.9, the Markdown content you paste into the WYSIWYG editor using Command / Control + V is parsed and rendered as rich text.
You can still force the content to paste as plain text using Command / Control + Shift + V.
See Documentation and Issue.
Solution 3:[3]
For GitLab versions 11.3 and later, any files attached to wiki pages can be found and altered by cloning the wiki repository (from link on the right sidebar) and navigating to the /uploads folder inside the local repo. Changes can be pushed up.
Where files are stored
Attach a file, and GitLab stores it according to your installed version of GitLab:
- Files added in GitLab 11.3 and later: Files are stored in the wiki’s Git repository.
- Files added GitLab 11.2 and earlier: Files are stored in GitLab itself. To add the file to the wiki’s Git repository, you must re-upload the file.
GitLab - Create a new wiki page
How to get a local repo of the wiki
Wikis are based on Git repositories, so you can clone them locally and edit them like you would do with every other Git repository. To clone a wiki repository locally, select Clone repository from the right-hand sidebar of any wiki page, and follow the on-screen instructions.
GitLab - Create or edit wiki pages locally
Restricting users that can view wiki pages
It is not currently possible to restricting what pages users/groups can see on GitLab wiki. There is a GitLab issue that recommends this feature. This extends to files in the wiki repo.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Fairy |
| Solution 2 | |
| Solution 3 |


