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
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
https://page/rest/api/latest/issue/{{issue.id}}/attachments
Hello, I try send attach to issue. file size 1.2mb and I get this message.
<html>
<head>
<title>413 Request Entity Too Large</title>
</head>
<body bgcolor="white">
<center>
<h1>413 Request Entity Too Large</h1>
</center>
<hr>
<center>nginx/1.12.2</center>
</body>
</html>
Try send by curl php
$ch=curl_init();
$headers = array(
'X-Atlassian-Token: nocheck',
'Content-Type: multipart/form-data'
);
$cfile = new \CURLFile('/home/media/1.jpg');
$cfile->setPostFilename('_2018-06-29_12-55-15_4.jpg');
$cfile->setMimeType('image/jpg');
$data = array('file'=>$cfile);
curl_setopt_array(
$ch,
array(
CURLOPT_URL=>$attachUrl,
CURLOPT_POST=>true,
CURLOPT_VERBOSE=>1,
CURLOPT_POSTFIELDS=>$data,
CURLOPT_INFILESIZE => 5,
CURLOPT_SSL_VERIFYHOST=> 0,
CURLOPT_SSL_VERIFYPEER=> 0,
CURLOPT_RETURNTRANSFER=>true,
CURLOPT_HEADER=>true,
CURLOPT_HTTPHEADER=> $headers,
CURLOPT_USERPWD=>"$JiraUsername:$JiraPassword"
)
);
$result=curl_exec($ch);
$ch_error = curl_error($ch);