Skip to content

Confluence Server: attach_content() uses PUT on child/attachment, causing 405 #1660

Description

@berke581

Since the Cloud/Server split in the v5, Server.attach_content() sends a single PUT request. Confluence Server doesn't support PUT on this endpoint, only GET/POST, so every attachment upload fails with 405 Method Not Allowed.

In 4.7.0, this worked via GET (check existing attachment) plus POST (create/update).

Steps to reproduce:

from atlassian import Confluence

confluence = Confluence(url="https://<server-instance>", token="<PAT>")
confluence.attach_file("/tmp/file.csv", page_id="page_id")

Expected:
File attaches successfully (as in 4.7.0).
Actual:
HTTPError: HTTP 405 on PUT .../rest/api/content/page_id/child/attachment.

Environment
atlassian-python-api 5.0.3 (broken since 5.0.0)
Confluence Server

Are we aware of this issue?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions