Add an attachment using Javascript

Does anyone have an example of adding an attachment to an issue using JavaScript?

Not sure if you mean client-side or server-side. I explored that in a project using JWT/OAuth 2.0 flow. See jira-issue-attachment.js

1 Like

Appreciate your help. Thank you.

I was looking for a client-side solution.

I’m still learning JavaScript. Will your solution work client-side? I guess I 'll find out when I try it!


The linked file would be pretty transportable, but the surrounding code is most certainly server-centric. For example, you’ll have to find an auth mechanism that works for your context. I hope you’ll post your code as open source when you get something working. Or, before, if you need any additional help. :slight_smile: