Adding an attachment to an issue (React)

I’m developing an intake application to simplify creating, viewing and searching issues in Jira. I’m struggling to figure out how to use the API to create issues with attachments. Does anyone have an example of creating an issue with an attachment? I’m using React JS and axios. Thanks

Hi Abdul. Are you developing an add-on for JIRA Cloud, or are you developing an add-on for JIRA Server, or is your application a separate thing that isn’t an add-on for JIRA at all? If you are trying to use JIRA’s REST API, I think you may be out of luck. The JIRA REST Scopes don’t indicate that POSTing or PUTing of attachments is possible. If you are developing an Atlassian Connect add-on for JIRA Cloud, then your own server could potentially store the attachments, and your add-on could serve those attachments up to users when required.

If you are developing an add-on for JIRA Server, then you could make use of the com.atlassian.jira.issue.AttachmentManager class that in the JIRA API library.

Hey David,

Thanks for your help. My application is separate from JIRA, so as a result, creating attachments isn’t possible.