Creating Service Catalog File Download Links

jmiskey
Kilo Sage

Using Helsinki, we are trying to figure out how we can add a Download Link to a Service Catalog Variable.

I found this link here: Re: catalog item download a file from catalog item

That seemed to work just fine from the Self Service Service Catalog, but when ran from the Service Portal, the link does not display.

Then I came across this link here: UI macro is not visible on Portal? , which says that UI Macros do not work from Service Portal.

So, that last link seems to suggest that I need to create a Widget to do this.   I have never created a Widget before.

Can someone explain how to create a Widget specifically designed to create a link to download a file, and how to incorporate it into my Service Catalog?

Thanks

1 ACCEPTED SOLUTION

jimnicholson
Giga Guru

Joe,



This should get you what you need for the widget, then select it in the "Widget" field of your macro variable in the catalog:



(just replace the bolded items with your stuff)



HTML Code:



<div>



<a href="/sys_attachment.do?sys_id={sys_id of your attachment}">Text you want to display</a>



</div>


Client Controller:



function ($scope,$location) {



  $scope.download = function(path){



  $location.path(path);


};


}


Hope this helps!


View solution in original post

2 REPLIES 2

jimnicholson
Giga Guru

Joe,



This should get you what you need for the widget, then select it in the "Widget" field of your macro variable in the catalog:



(just replace the bolded items with your stuff)



HTML Code:



<div>



<a href="/sys_attachment.do?sys_id={sys_id of your attachment}">Text you want to display</a>



</div>


Client Controller:



function ($scope,$location) {



  $scope.download = function(path){



  $location.path(path);


};


}


Hope this helps!


What we need to pass in place of  sys_id of your attachment(because it will be dynamic )?

and in place of path??