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
Highlighted

413 Request Entity Too Large Edited

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);

 

1 comment

Timothy Community Leader Jul 26, 2018

This is an error from your nginx proxy, not a Jira problem.

Comment

Log in or Sign up to comment
TAGS

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