You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I'm trying to reproduce a `multipart/form-data` request within Jira Automation. The request is a POST to the Confluence v1 API attachments endpoint, and I have called this successfully using Postman.
However, when running within Jira Automation, I'm receiving code 500: `java.lang.RuntimeException: org.apache.commons.fileupload.FileUploadException: Stream ended unexpectedly`.
Researching this error has sent me round in circles with variations of CRLF (or `\r\n`), and I have tried every permutation to no avail. This post looked particularly promising, pointing specifically to the new line before the last boundary - again I experimented to no avail.
The below is the exact request Postman is making for a very simple text file, as captured by Fiddler. I have lifted this exact text into the Jira Automation web request, configuring the same headers Postman is using.
----------------------------882762106784743758392779
Content-Disposition: form-data; name="file"; filename="New Text Document.txt"
Content-Type: text/plain
SampleTextContent
----------------------------882762106784743758392779
Content-Disposition: form-data; name="minorEdit"
1
----------------------------882762106784743758392779--
`Content-Type` header configured in Jira Automation is:
multipart/form-data; boundary=--------------------------882762106784743758392779
Where am I going wrong? TIA!
*Side note - I'm doing this because I want to automatically create a Confluence page which carries the same attachments as the Jira issue that triggered it. If anyone is aware of another way to do this, I'd welcome ideas.
Hi @Chris Bonnar -- Welcome to the Atlassian Community!
As you appear to be on a paid, Jira license, you may want to work with your site admin to submit this one as a support ticket to Atlassian here: https://support.atlassian.com/contact/#/
In the meantime, you could also ask this one in the developer community here: https://community.developer.atlassian.com/
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.