I am uploading a file using node.js and axios via APIs onto my confluence page and using the following endpoint:
PUT https://<companyname>.atlassian.net/wiki/rest/api/content/<pageID>/child/attachment
The file uploads correctly under the "Attachments" section of the page with the file name and extension (DataDictionary.txt).
I am then trying to put the file onto the main page's body and instead of showing "DataDictionary.txt" I see a random number 1990001000.
I am using the following endpoint:
PUT on https://<companyname>.atlassian.net/wiki/rest/api/content/<pageID>
with the payload:
Hello there!
That is an interesting behavior, @Affan Rashid. I was not able to replicate it, so I would like to ask you a few questions:
- Are you uploading a new version of the attachment?
- Are you able to set the file preview via user interface?
- Is this affecting one specific file type or multiple ones?
I was also able to find a report about a very similar case, but it only happens when the user tries to upload a new version of the attachment. You can check it here:
Let us hear from you!
Hi Diego,
1. I update the version number every time I do a PUT on the following endpoint.
PUT on https://<companyname>.atlassian.net/wiki/rest/api/content/<pageID>
I increment the version number by 1 in my code on the following payload:
2. I was able to manually upload the file using the "Files & Images" option on my page and the preview correctly shows the file as a .txt
3. I have not tried with any other file types.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.