keelapps

keelapps/Guides

How to move attachments between pages in Confluence Cloud

Confluence Cloud · Updated

Files end up on the wrong page all the time: a contract uploaded to the meeting notes, twenty invoices on a page that is about to be archived, a template space where every file sits on the home page. Confluence Cloud can move an attachment to another page, but only one file at a time. This guide covers the built-in steps, a REST call that moves a file and keeps its version history, the faster way that does not, and what every move breaks no matter how you do it.

We build Satchel for Confluence, which moves files in bulk, so read the last section with that in mind. Everything before it works on any Confluence Cloud site with no app installed.

Move one file from its Properties

This is the way Atlassian documents in Manage uploaded files:

  1. Open the page, whiteboard or blog post that has the file.
  2. Select Show details, then Attachments.
  3. Select Properties next to the file you want to move.
  4. In the Page field, type the title of the target page. If it is in another space, put the space key first: DOC:My Destination Page.
  5. Select Save.

You need the Add Content, Add Attachment and Remove Attachment space permissions. For two or three files this is fine. For forty it is forty rounds of the same dialog, and nothing on the screen helps you check that you moved all of them. A bulk move has been requested since March 2009 in CONFCLOUD-15025, and in January 2022 Atlassian said it has no plans to prioritize it in the near future.

What a move changes

Confluence finds an attached file by its page and its file name. So whichever way you move a file, three things follow:

Before a big move, look at the source page and note which files it shows. After the move, edit both pages. If the target page already has a file with the same name, deal with that first: Confluence treats a file with the same name on one page as a new version of the same file.

Move many with the REST API

Confluence Cloud has no bulk move call, but it has a call that changes the page an attachment belongs to. In the v1 API, Update attachment properties updates the non-binary data of an attachment, including its parent container. The new v2 API has no write call for attachments, so this v1 call is the one to use. It moves the file without sending its bytes again. When we ran it on a test site, the attachment kept its ID, and its version number went from 1 to 2.

  1. Create an API token and use it with your email for basic authentication. The calls run as you, so you need the same space permissions as in the steps above.
  2. Find the page IDs. The number in a page URL after /pages/ is the page ID.
  3. List the files on the source page, following _links.next if there are more:
    GET /wiki/api/v2/pages/{sourcePageId}/attachments
    Each result has an id (like att123456), a title (the file name) and version.number.
  4. For each file you want to move, send:
    PUT /wiki/rest/api/content/{sourcePageId}/child/attachment/{attachmentId}
    Content-Type: application/json
    
    {
      "id": "att123456",
      "type": "attachment",
      "container": { "id": "{targetPageId}", "type": "page" },
      "version": { "number": 2, "minorEdit": true, "when": "2026-10-09T08:00:00Z" }
    }
    version.number must be the file’s current version plus one. Here the file was at version 1.

The answers to expect: 200 means the file moved. 409 means the version number did not match, so read the file again and retry with the new number. 403 means you are not allowed to move this file, or the target is not something a file can be moved to. Try it on one file and check both pages before you loop over the rest, and keep a list of what you moved, so you can move it back with the same call.

Download and upload again

The other way is to download the files, upload them to the new page and delete the originals. The page’s Show details → Attachments list has a Download All button that gives you the page’s files as one zip, and you can drop many files on the target page at once. It is quick, but it is a copy, not a move:

If nobody cares about old versions of these files, that is fine. For contracts, designs and anything with an approval trail, use Properties or the REST call above.

Sometimes, move the page

Attachments belong to their page, so when you move a page in the page tree, its files go with it, and the page still shows them. If the real problem is that the page is in the wrong place, move the page. If only some of its files belong somewhere else, move those files.

Where Satchel fits

Satchel for Confluence lists every attachment in a space in one table. You select files from any number of pages, pick the target page, and read a dry run before anything happens: what will move, what will not and why, and which of the two ways above your site allows. It tries the move that keeps IDs and history first and only copies when Confluence says that move does not exist. Afterwards it reports which way each file actually went, and the move can be undone for 30 days.

It does not fix the page text for you: the embeds on the old page and the links described above still need an edit. It runs on Atlassian Forge with no external calls and is free for sites of up to 10 users.

Try Satchel free