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

Get URL of Image Shipped with Plugin

Phillip Ponzer [Cprime]
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.
April 3, 2013

I have a plugin that creates RemoteIssueLinks. This plugin has a few images I'd like to use as the link's "iconUrl". The images are located in the following folder:

<my-plugin>/src/main/resources/images

What URL can I use to reference those images?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Akeles
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.
April 14, 2013
Phillip Ponzer [Cprime]
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.
April 14, 2013

Thank you very much! That led me to what eventually ended up working for me.

Here's what I did:

When building the RemoteLink, for the iconUrl, I had to obtain the applicationProperties in order to get to JIRA's base URL. Like so:

ApplicationProperties applicationProperties = ComponentManager.getInstance().getApplicationProperties();
String url = applicationProperties.getString(APKeys.JIRA_BASEURL)
 + "/download/resources/com.example.jira.mylink/images/"
 + link.getStatus().toLowerCase().replace(" ", "_") + ".png";
return new RemoteIssueLinkBuilder().iconUrl(url).build();

TAGS
AUG Leaders

Atlassian Community Events