We are using the downloads folder to deploy our artefacts and we recently started having serious issues with this page not showing any files anymore. We can access the folder through the API, which we use to download files via our Jenkins CI.
We have an agreed retention policy of our build artefacts and to enable this, we want to be able to remove artefacts that are older than a certain value. I could not find a way to do this via API or any other way so far.
I would love to get some insights from the community on this one.
Hi Erik,
By downloads folder, I assume that you are referring to the Downloads section of a repo?
There is an API endpoint for deleting a certain file from the Downloads section of a repo, but I believe it is not possible to filter by date (so, delete a file older than a certain date).
This could perhaps be done if you write a script that gets all files from the Downloads section via an API call, then manipulate the JSON string in the output and filter by the created_on date, so that you get files older than a certain date, and then delete those files via an API call.
Regarding the Downloads page not loading for you, there is a possibility the page may not be loading due to a time out error. How many files do you have uploaded approximately? I've seen similar issues reported by users who've had a few thousands of files uploaded in that section, and the page was not loading because the request was timing out.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.