Forums

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

Send files/attachments over REST

AnupamS June 4, 2019

I have a requirement where I am supposed to transact attachments over two instances. I need to transfer the file from source (preferably through custom REST), and receive it in destination and then manipulate. I am unable to find a way. 

 

Back-ground : I tried various options before this like, curl (curl -L -O -k -u 'username:password' -X GET BASE_URL/secure/attachment/FILE_ID/FILE_NAME). It gets downloaded from my machine perfectly but when I execute from the groovy console, it is getting downloaded with weird content inside. The file size of file downloaded from groovy is also coming out same irrespective of actual size. I used various other options (converting to bytes and streaming it out), but all are downloading with content changed.

 

Is there any other way that I can manage files across two different instances from script/program?

2 answers

0 votes
AnupamS June 6, 2019

Hi Yoga, it is basically moving attachments (Jira to Jira, two different instances) of an issue from one instance to issue of another. Size can be anything, location is generic jira standard.

0 votes
Yoga Reddy {Appfire}
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.
June 5, 2019

Hi @AnupamS 

Can you please confirm if you want to transfer the attachments from any Atlassian application ?Are the attachments stored in any specific location? What is the size of the attachments?

Thanks
Yoga


Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events