Skip to content
This repository was archived by the owner on May 7, 2021. It is now read-only.
This repository was archived by the owner on May 7, 2021. It is now read-only.

405 response code using add-attachment command #6

@pawelsikora

Description

@pawelsikora

Hi,

How to use properly add-attachment command? I am not able to upload image to specified page
using confluence-cli from docker image

Log:

2021/04/12 19:15:49 Found ancestor ID 1234 2021/04/12 19:15:49 Successfully processed file: /tmp_ek6qohg.png ... 2021/04/12 19:15:49 JSON Content: 2021/04/12 19:15:49 Sending request to services... 2021/04/12 19:15:50 Response received, processing response... 2021/04/12 19:15:50 Response status code is 200 2021/04/12 19:15:50 200 ... 2021/04/12 19:15:50 Page found, adding attachment... ... 2021/04/12 19:15:50 Sending request to services... 2021/04/12 19:15:50 Response received, processing response... 2021/04/12 19:15:50 Response status code is 405 2021/04/12 19:15:50 Bad response code received from server: 405

Note: I am able to send REST request via cmdline (curl) and from python successfully,
looking at the code (and from my trials) it looks like there is missing of some parts of the request:

  1. headers: 'X-Atlassian-Token': 'no-check'?
  2. multipart/form-data in content type?
  3. content-type missing in multipart/form-data data for the file to be added as an attachment?

Please let me know how to deal with this issue - adding/updating pages works fine

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