wiki old uploaded files orphans
Problem to solve
Remove orphan uploaded files in wiki
Intended users
- Everybody that wants to share information with the gitlab included wiki
Further details
all upladded files are store in a directory wiki/uploads/token-number each time a file needs to be updated a new directory with the new file is created, but the previous reference is not removed (still accessible if once remember the file URL)
ie:
link created when a file is uploaded to the wiki
https://xxxxxxxxxxxx/wikis/uploads/2627ee6fd83587493f8ca98d63c9b204/file_version1.pptx
link created when file is changed, ie :
https://xxxxxxxxxxxx/wikis/uploads/0c45ef485eff61abc99e9b50c72bddd4/file_version2.pptx
Proposal
It seems to me the uploaded files are stored in the gitlab database (I did not find file on any filesystems in the gitlab node). The proposal is to check if a file reference (in the DB) can be found in any of wiki pages, if not remove the file from the DB.
Permissions and Security
cleaning job should be able to manage files (uploaded file on the wiki)
Documentation
no documentation is needed, except where to activate the cleaning job
Testing
- create a wiki page with an uploaded file (any type of file) (note the URL leading to the file)
- update the wiki page by changing the version of the file, so the previous uploadfed file doesn't need to exist anymore
- launch the cleaning job (to remove orphan files)
- check the URL noted in step one, that should no longer exist
What does success look like, and how can we measure that?
The success of the cleaning job, will be to reduce disk space consumption.
What is the type of buyer?
Companies working with wiki to share documents with files, should be interested by this new feature
Links / references
none