I am trying to use Confluence REST APIs to make a POST call to upload images. In postman, I get error that says "unsupported media type." Can you tell me what I am doing wrong in the following python request:
import requests
headers = {
'X-Atlassian-Token': 'no-check',
}
files = {
'file_0': ('branch_strategy_2.jpg', open('branch_strategy_2.jpg', 'rb')),
}
url = '<baseURL>/rest/api/content/<pageID>/child/attachment'
file = "c_branch_strategy_2.jpg"
response = requests.post(url, headers=headers, files=files, auth=('uid', 'pwd'))
print(response.json)