“Sidebar Link” plugin is used.
How do I remove the “all files in zip” link?
As far as I know, there is no way to remove that action without making changes to the plugin.
Thank you for your prompt advice.
It seems to be too difficult, so I’m going to give up.
This is a Jenkins core feature, not specific to the Sidebar Link plugin. You’d get the same kind of directory listing and ”all files in zip” link from the same URL even if you uninstalled the Sidebar Link plugin.
Jenkins maps the “userContent” directory to the DirectoryBrowserSupport class: jenkins/Jenkins.java at 082634cf1e4ef91cac8c82815e52046083722e36 · jenkinsci/jenkins · GitHub
DirectoryBrowserSupport displays the “all files in zip” link: jenkins/dir.jelly at 5b1e934544e0dabd5ae4088dba7e97d652e075d7 · jenkinsci/jenkins · GitHub
I think the it would be easier to hide the link and block the zip download URL by modifying the core than by modifying a plugin.
You can do almost anything in CSS. You can match that extract string and then hide it. it wouldn’t disable the feature just hide the link.
That being said I can’t really think of why you’d want to disable it unless you archived lots of huge files and the zipping was blocking things.
Hi all,
Thank you for advice.
The method of customizing the core functionality of Jenkins that kon showed us was difficult for me.
So I created “disable_all_files_in_zip.css” and hide “all files in zip”. (functionality remains enabled).
$ cat disable_all_files_in_zip.css
.jenkins-link–with-icon {display: none}
The reason I want to hide “disable_all_files_in_zip.css” is because I am publishing a directory with a lot of huge files (e.g., tar.gz files larger than 200 MB) and I don’t want to overload the server.
With everyone’s help, I was able to resolve the issue completely.
Thank you very much.