Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Add attachment fails silently

Yibo Liu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 21, 2021

Hi there,

I'm using Jira java API to add attachments to existing open issues. Sometimes I see the

Promise<Void> addAttachment(URI attachmentsUri, InputStream in, String filename);

 finishes without any exception thrown, but the file was not actually attached. To confirm this, I added one more checking of getAttachments(), to see if the number of attachments increases, after the execution of addAttachment(). It turned out to be that sometimes the number does not increase. 

Can I know in what kind of scenario can this happen and how can I prevent it?

Thanks a lot!

0 answers

Suggest an answer

Log in or Sign up to answer