Jira.js - Jira Cloud API library
    Preparing search index...

    Interface AddAttachment

    Parameters for adding attachments to an issue.

      const addAttachmentParams: AddAttachment = {
    issueIdOrKey: 'PROJECT-123',
    attachment: {
    filename: 'example.txt',
    file: 'Hello, world!',
    mimeType: 'text/plain',
    },
    };
    interface AddAttachment {
        attachment:
            | Version2Parameters.Attachment
            | Version2Parameters.Attachment[];
        issueIdOrKey: string;
    }
    Index

    Properties

    The attachment(s) to be added. Can be a single Attachment object or an array of Attachment objects.

      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
    },
    ];
    issueIdOrKey: string

    The ID or key of the issue to which the attachments will be added.

      const issueIdOrKey = 'PROJECT-123';