Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

N_Joubert I'm New Here Sep 24, 2020

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].atlassian.net/wiki/rest/api/content/[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.

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Confluence

Announcing Team Calendars in Confluence Data Center

Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond.  A long time favorite,  Team Cale...

78 views 0 3
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