In the JIRA JSON api, you can add attachments by giving a url in an attachments array. From the docs for confluence, it looks like I would need to upload the file via multipart post. Is there a way to give confluence a URL and have it do the download like JIRA does?