Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is there a way to remove files from the downloads folder?

Erik Talboom February 12, 2021

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.

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 16, 2021

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events