Parameters for adding attachments to an issue.
const addAttachmentParams: AddAttachment = { issueIdOrKey: 'PROJECT-123', attachment: { filename: 'example.txt', file: 'Hello, world!', mimeType: 'text/plain', }, }; Copy
const addAttachmentParams: AddAttachment = { issueIdOrKey: 'PROJECT-123', attachment: { filename: 'example.txt', file: 'Hello, world!', mimeType: 'text/plain', }, };
The attachment(s) to be added. Can be a single Attachment object or an array of Attachment objects.
Attachment
const attachments = [ { filename: 'file1.txt', file: Buffer.from('File 1 content'), mimeType: 'text/plain', }, { filename: 'proof image.png', file: fs.readFileSync('./image.png'), // Reads the image file into a Buffer }, ]; Copy
const attachments = [ { filename: 'file1.txt', file: Buffer.from('File 1 content'), mimeType: 'text/plain', }, { filename: 'proof image.png', file: fs.readFileSync('./image.png'), // Reads the image file into a Buffer }, ];
The ID or key of the issue to which the attachments will be added.
const issueIdOrKey = 'PROJECT-123'; Copy
const issueIdOrKey = 'PROJECT-123';
Parameters for adding attachments to an issue.
Example