HI Team,
To push to image/file to Confluence page, what kind of permission required for the user.
Because while performing the below tow steps, we are not able to see any attachments in confluence page.
Step:- 1
USER_NAME=<username> # the user must have the necessary permissions on the target page and space
USER_PASSWORD=<user password>
CONFLUENCE_BASE_URL=<Confluence Base URL>
ATTACHMENT_TYPE=<image | file>
ATTACHMENT_FILE_NAME=<full path to the attachment file>
PAGE_ID=<target pageid>
Step:- 2
curl -u $USER_NAME:$USER_PASSWORD \
-X POST \
-H "X-Atlassian-Token: nocheck" -F "file=@${ATTACHMENT_FILE_NAME}" -F "comment=File attached via REST API" \
${CONFLUENCE_BASE_URL}/rest/api/content/${PAGE_ID}/child/attachment 2>/dev/null \
| jq -r '.results[].title'
So we are assuming that, might the user don’t have proper access to push the image.
Please assit
Regards,
Abhishek
@Alex Medved _ConfiForms_ is right, you need "Attachments" add and "Pages" add (ie page edit) permissions in the space in order to add attachments to a page in your space.
What is the response code you are getting from this request?
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.
Hi
As far as I know you need Create Attachment global permission and Edit Page permission
Alex
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.