I have been using the atlassian-connect-express project as a baseline for my application. I have successfully been able to use the JIRA and Confluence REST api's to read data (and have correctly defined my scopes, but I have been unable to use either JIRA's or confluence's REST api to upload an attachment.Neither the example in the SequenceDiagramr code (using JSON RPC) or the example in the atlassian-connect-express homepage has worked for me.
What I am looking for is example node.js code that:
1) uses either the Jira endpoint: /rest/api/2/issue/{issueIdOrKey}/attachment or Confluence endpoint: /rest/api/content/{pageId}/child/attachment
2) Uploads a file "helloworld.txt" with the contents 'hello world', or simply uploads the contents 'hello world' to either a JIRA issue or Confluence page
Thanks so much for your help,
Elliot