Good morning everyone,
i am trying to upload an XLSX file to one of our Confluence pages, sadly it all fails. I read serveral entries in the forums indicating it might have to do with the content type, but to no avail, it also does not seems to matter where i define the content-type (Header or when calling Invoke-RestMethod), please see my code at the end.
If i leave the Content-Type out, i get a different error, this was recommended in one other article here.
Any help is appreciated.
$JiraHeaderXlsx = @{
"Accept" = "application/json"
"Authorization" = $JiraCredentials
"Content-Type" = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
"X-Atlassian-Token" = "nocheck"
}
$jiraUri = "https://xxxxxxx.atlassian.net/wiki/rest/api/content/xxxxxxx/child/attachment"
$response = Invoke-RestMethod -Uri $jiraUri -Headers $JiraHeaderXlsx -Method POST -InFile $excelExportFile