Skip to content

[Confluence] how to download an image as a file into local file system #1175

Open
@nnako

Description

@nnako

Hi,

the atlassian-python-api provides some functions for uploading images into a Confluence space / page / ... . But I wonder if there is a function to actually download an existing image from a page where it has previously been attached. Skimming through the documentation, there seems to be one relevant function: get_attachments_from_content(), and maybe one other promising general function: get_page_child_by_type().

With none of those I have been successful, yet, while attempting to actually get an image file (e.g. test.png) from the Confluence page (identified by its page id) down into my local computer's target folder. I just get promising responses containing various metadata, even containing links which seem to point to the actual attachment.

-> Is there a function to directly download an attachment from a page into the local target file system?
-> If not, what would the practical steps be to get an image actually downloaded?

Metadata

Metadata

Assignees

No one assigned

    Labels

    confluenceAtlassian Confluence (Cloud, Server or Dataceneter)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions