+ String downloadURL = getDownloadURL();\r
+ if (!downloadURL.isEmpty()) {\r
+ link[0] = "<a class='hidden-link' href='" + downloadURL\r
+ + (forceDownload ? "&dl=1" : "") + "' target='_blank'>";\r
+ link[1] = "</a>";\r
+ }\r
+ }\r
+\r
+ public String getDownloadURL() {\r
GSS app = GSS.get();\r
Object selection = app.getCurrentSelection();\r
if (selection != null && selection instanceof FileResource) {\r
FileResource file = (FileResource) selection;\r
GSS app = GSS.get();\r
Object selection = app.getCurrentSelection();\r
if (selection != null && selection instanceof FileResource) {\r
FileResource file = (FileResource) selection;\r
String dateString = RestCommand.getDate();\r
String resource = file.getUri().substring(app.getApiPath().length()-1,file.getUri().length());\r
String sig = app.getCurrentUserResource().getUsername()+" "+RestCommand.calculateSig("GET", dateString, resource, RestCommand.base64decode(app.getToken()));\r
String dateString = RestCommand.getDate();\r
String resource = file.getUri().substring(app.getApiPath().length()-1,file.getUri().length());\r
String sig = app.getCurrentUserResource().getUsername()+" "+RestCommand.calculateSig("GET", dateString, resource, RestCommand.base64decode(app.getToken()));\r