Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Deleting versions of attachments is failing

Jordan Hauser
Contributor
April 26, 2022

Hi all,

 

I got a request from a user today to remove some of the recent attachments added to a page to correct for mistakenly uploading a new version that had no changes.

There are 5 versions on this attachment, I needed to delete the most recent ones.

I deleted the 4th using some code in scriptrunner to do so via the API, but afterwards I received errors saying I cannot do the same operation on a 'current' version.

So I navigated to the GUI attachments section for the page, opened up the versions dropdown and tried to delete it.

The confirmation dialogue box pops up, and I can see when I press 'OK' in the confluence server logs, but nothing happens. 

Did I mess up the api requests? I saw something in the forums while building it that it didn't delete from the db, not sure if that causes what I'm seeing here.

 

Testing on another page I was able to delete other versions with no problems, further testing in progress to see if it was my script that caused this.

Either way has anyone experienced this bug and know how to correct it?

-Jordan

2 answers

0 votes
Stavros_Rougas_EasyApps
Atlassian Partner
March 17, 2025

If you have moved to cloud use Attachment Manager by Easy Apps.

0 votes
Jordan Hauser
Contributor
April 29, 2022

I never found a solution for this, I ended up just having to save the newest version I wanted to keep then removing all the bad ones and re-uploading the one I wanted to save as the latest. I did this by going to the attachments for a page, and as the site admin I could delete any versions through the GUI.

Glad I got it working through the api at first, kind of a shame I couldn't figure out how to roll back to the previous version of the attachment and delete the current one through the API.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events