Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

I am recieving a 500 "File name cannot be null or empty" error on the CreateAttachment API

I am trying to upload some attachments to a confluence wiki page through the create attachment API.


I am using this curl as a test but keep getting an error after following all examples I can find on it:

curl -D- -u [username]:[token] -X POST -H "X-Atlassian-Token: nocheck" -F "file=MyFile.txt" -F "comment=This is my File" --header "Accept: application/json" https://[domain][page_id]/child/attachment


The exact error I get back is: {"statusCode":500,"message":"java.lang.IllegalArgumentException: File name cannot be null or empty."}


Any other fields I might be missing in the request? I don't see anything else in the documentation on this.

1 answer

0 votes
Fabian Lim Community Leader Dec 24, 2021

Hi Neill,

Looks like this isuse has been resolved in the new versin of confluence cloud:


Suggest an answer

Log in or Sign up to answer
Site Admin
Community showcase
Published in Confluence Cloud

🏠 Say hello to the new Confluence Home!

Hi Atlassian Community, My name is DJ Chung, and I’m a Product Manager on the Confluence Cloud team. Today, I’m excited to share a new and improved version of Home. The new Home helps you ...

38,192 views 27 125
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you