It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do I upload attachment to JIRA Issue via REST API and make share it with customer?

Dear All,

 

I could successfully attach a file to a Jira issue, however, it's not publicly available, in other words, customers can not see the file.

I used curl for this integration and could not find a way to share the attachment.

any comment or suggestion is welcome.

Thanks

3 answers

1 accepted

1 vote
Answer accepted

Hi Vahid Azad,

By default customers cannot see attachments unless you share it within a public comment.

So I believe you must create a comment referencing the new file you've just uploaded using the folloing syntax:

images files:

!image-2020-01-10-08-36-21-609.png|thumbnail!

or for other files:

[^documentation.pdf]

 

 

Alternatively you can use a third-party app such as Extension for Jira Service Desk to allow attachments be viewed by customers.

 

Kind regards

Thanks Jack, I try creating a comment as well to see if it can be accessible. I will come back with the result.

0 votes
Joe Pitt Community Leader Jan 15, 2020

Attachments are visible to user that can see the issue. You can't share an attachment outside of the issue. Can you customers see the issue? 

Attachments are not visible in the service desk which is the front-desk for the customers, it is indeed visible in the Jira but not in the customer view mode

Hi all,

This worked perfectly for me:

 

curl -u admin:admin -X POST --data '{"body": "Please find the requested file attached. \n\n [^Document.ZIP] "}' -H "Content-type: application/json" http://localhost/rest/api/2/issue/TEST-123/comment

Glad to know :)

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you