If someone is struggling here is the solution
const form = new FormData();
form.append('file', file.buffer, file.originalname);
const attachmentHeaders = {
headers: {
Authorization: `Basic ${this.credentials}`,
Accept: 'application/json',
'X-Atlassian-Token': 'no-check',
...form.getHeaders(),
},
};