Trying to add attachment through jira rest api

i am trying to build an app where i am trying to transition the status of an issue and when user tries to change status if an issue i am displaying a popup which displays the fields like we have in transition screen and i am trying to add attachment to the issue but i am unable to add attachments