Hi,
I tried to upload attachment with restApi, jiraRequest return 200 status code bot body is empty array
const form = new FormData();
form.append('file', blob, 'test.webm');
const responseFile = await requestJira('/rest/api/3/issue/'+issueKey+'/attachments', {
method:'POST',
body: form,
headers:{
'Accept': 'application/json',
'X-Atlassian-Token': 'no-check',
'Content-Type':'multipart/form-data; boundary=----WebKitFormBoundaryzU2OoKU9kzQe3Mb8',
'user-agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0',
'Cookie': 'atlassian.xsrf.token=0b01400c-2e53-42f4-9300-87b2d5189d6f_cc52a869d11568dfbbf747343a6caaa32ca3c7dc_lin'
}
});
console.log(`Response: ${responseFile.status} ${responseFile.statusText}`);
let res = await responseFile.json();
console.log(res)
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.