Is it possible to attach a file to a JIRA issue from the client's browser?

To authenticate, I tried using using:“POST”, “”);

But I get:
XMLHttpRequest cannot load Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:5551’ is therefore not allowed access. The response had HTTP status code 403.

Given this this response, I don’t know if this is even possible.

Any insight into this issue would be helpful.

Hi @ashwin.nirmul

JIRA Cloud doesn’t support CORS: [JRACLOUD-30371] Allow cross-domain requests for CORS - Create and track feature requests for Atlassian products.

Our Atlassian Connect framework provides a module for add-ons to make XHR requests in the browser without requiring CORS:


Thank you, Dave.

Is there an example of using ‘/rest/api/content/123456/child/attachment’ for JIRA?

I tried adding this code to the HelloWorld example (, but I get error: [Simple-XDM] Failed to validate origin:


Hi @ashwin.nirmul,

I believe the API path that you are referencing is for Confluence, not for JIRA.

There is a working (hopefully) example of using AP.request in a JIRA Cloud add-on if you run this demo app, which is based off of Atlassian Connect Express.