temporary link / url for the attachments of an issue

Mohan S_ P_ December 30, 2019

JIRA provides a way to access the attachments of an issue using basic auth, jwt auth mechanisms. Using which we can download those files. We're able to download the files using both authentication mechanisms.

sample jwt auth:

curl -X GET --url https://{site-name}.atlassian.net/secure/attachment/1001/example.txt -H 'Authorization: jwt <actual-jwt-token>'

 

Issue / Our requirement:

But is there a way to generate temporarily accessible url for the JIRA issue's attachments which will have token embedded into the URI itself. I've added the example of that below

example url:

https://{site-name}.atlassian.net/attachment/1001/example.txt?token={temp_access_token}

While accessing / clicking on the above mentioned url the download should automatically start even if the user isn't logged into their account

 

Reason for our requirement:

We're creating jira cloud based service / app and one of its feature is providing access to the user's attachments through our application. Our limitation(cloud service cost) is that we can't download all the huge sized attachments and store and manage it. So we're looking for a solution using which user's can download from the JIRA's server directly. 

2 answers

0 votes
Henri Toivar November 5, 2020

You could maybe proxy that request through your api and create your own temporary urls for images. 

0 votes
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 8, 2020

Hi @Mohan S_ P_ ,

Please notice that this is not the best place to get help on development  related questions. The right resources are listed in https://developer.atlassian.com/resources. 

Specifically:

 

Once this has been said, I am not sure whether or not the download link with the JWT token is supposed to work if the user is not logged into your app, but you may want to review the below links to see if you are facing anything similar:

 

Cheers,
Dario

Suggest an answer

Log in or Sign up to answer