Hi,
I have an embedded Excel sheet on a page in Confluence (version 5.10.4) that I want to update on a daily basis. When I use the REST-api as described below i cant overwrite an existing attachment. Is there a work around for this?
curl -D- -u user:pass -X POST -H "X-Atlassian-Token: no-check" -F "file=@export.xlsx" https://wiki.xyz.com/rest/api/content/63459897/child/attachment/
HTTP/1.1 100 Continue
HTTP/1.1 400 Bad Request
Server: Apache-Coyote/1.1
X-ASEN: SEN-2412214
Set-Cookie: JSESSIONID=5F3AA70B086187DF857F2F7C43350B6; Path=/; HttpOnly
X-Seraph-LoginReason: OK
X-AUSERNAME: user
Cache-Control: no-cache, must-revalidate
Expires: Thu, 01 Jan 1970 00:00:00 GMT
X-Content-Type-Options: nosniff
Content-Type: application/json
Transfer-Encoding: chunked
Date: Wed, 20 Dec 2017 10:16:37 GMT
X-Cnection: close
Set-Cookie: Site=!w9E67t/RiK/og3NjjX1iLPx+upVsmJEKY2C/ELZac2NYeWE5o8xzX588IVwH5yfISRMm6Cuh1P4=; path=/; Httponly; Secure
{"statusCode":400,"data":{"authorized":false,"valid":true,"errors":[],"successful":false,"notSuccessful":true},"message":"Cannot add a new attachment with same file name as an existing attachment: export.xlsx"}