Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to use temporary attachment without converting it to real attachment?

Andreas Ebert
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 6, 2015

In JIRA 6.2 (and below) and its file-based attachment API it was possible to:

  1. Define a dialog, where users can upload temporary attachments.
  2. In the corresponding Action, directly use those temporary attachments (in my case: for sending mails).
  3. Disgard the temporary attachments.

In JIRA 6.4 the file-based API is deprecated, in favor of the new stream-based API, and it appears that my previous approach is not possible anymore, because the new TemporaryWebAttachment has no getFile(), getStream() or something similar. In fact, the only way I found to get to the attachment data, is by first converting it to a real attachment and then using AttachmentManager.streamAttachmentContent() to read the data. But that is not what I want. I don't want to convert to a real attachment first. I only need the temporary attachment for the duration of my Action.

So my question:
In JIRA 6.4, how to read temporary attachments without converting them to real attachments? Is it possible?

4 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Erik Gotera February 5, 2019

Hi Andreas,

Do found some information?

Thanks!

Alexandre Machado February 25, 2019

Nothing yet!

0 votes
Alexandre Machado February 19, 2016

Okay!

If I find out some information, I'll inform you!

0 votes
Andreas Ebert
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 17, 2016

No, unfortunately not. My workaround – as described my question – is to first convert the temporary attachment into a real attachment.

0 votes
Alexandre Machado February 17, 2016

Hi Andreas,

I have the same question... https://answers.atlassian.com/questions/36602735

Do found some information ?

Thanks!

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events