Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

can I use multiple files to attach in one command in rest API

ramesh kumar September 20, 2022

Hi Team,

I got this command to upload an attachment. Can i use 3 file names separated by commas using below comand?

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 

If NO what is the best way (other than running a loop) to attach all 3 files with a single command to a confluence page?

1 answer

0 votes
Rachi Manwal June 1, 2023

@ramesh kumar  Were you able to attach multiple files at once?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events