Hi All,
I'm looking for some help with uploading attachment to JIRA issue by using POST action in Web API Services with Single or Multiple Files. I tried multiple solutions so far, but with no success. For a single file approach I tried to use various headers like Content-Type equal to application/json, application/pdf, application/x-binary (and binary), application/octet-stream, etc., X-Atlassian-Token: no-check, Content-Disposition: form-data and many many different combinations. All request were made against such endpoint (as per JIRA docu):
https://jira.{base-url}.net//rest/api/[Version]/issue/[Issue ID]/attachments (Version = 2). So far I manage to got 2 results that make any sense. In single file case I'm getting status code 415 which means "Unsupported Media Type" and I was sure that I will be able to fix it with proper header name, but no luck so far
😞 (I'm trying to upload binary file loaded to data item/collection). For the multiple files request I'm receiving status 200 but response content is empty, and...the file is not getting uploaded. I also tried to run cmd command with following cURL code and it's working fine:
curl -D- -u {username}:{password} -X POST -H "X-Atlassian-Token: nocheck" -F "file=@{path/to/file}" http://{base-url}/rest/api/2/issue/{issue-key}/attachments
The only problem is the fact that I'm not able to read response content back to Blue Prism, and this is why I would like to have it in Web API Service where I have a lot others actions too. Does anybody have some experience with that?
Some more details:
I'm on BP 6.10.1, I've removed common headers, other activities are working fine, only file upload is not working.
Thank you in advance!