Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to attach file to an issue c# ubuntu

Артём Августинович
August 21, 2018

Hi everyone. I want to attach file to a just created issue and on localhost (windows 10 with IIS) my application on ASP Core works perfectly but when I upload it to ubuntu server an issue is created but attach fails. Status code is 400 and the response is that 'Data is null'. But I checked, all headers including content-length is set up correctly. And I repeat myself that the issue occurred only on ubuntu server not on windows one.

 

Headers I set:

Authorization: Basic [REMOVED]
X-Atlassian-Token: nocheck
Content-Type: multipart/form-data; boundary="---------------------------" + DateTime.Now.Ticks
Content-Length: length depending on the content
Connection: Keep-Alive

 

Content:

Content-Disposition: form-data; name="file"; filename="somename.extension"
Content-Type:application/octet-stream

 

So how it can depend on a server???

1 answer

0 votes
Артём Августинович
August 22, 2018

I suppose the issue wasn't in jira api. Solved by using HttpClient instead of HttpWebResponse

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events