Nestjs call rest attachments api not working

If someone is struggling here is the solution :slight_smile:

    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(),
      },
    };
1 Like