Revision fbff60ff web_client/src/gr/grnet/pithos/web/client/FileMenu.java
b/web_client/src/gr/grnet/pithos/web/client/FileMenu.java | ||
---|---|---|
139 | 139 |
public String getDownloadURL(FileResource file) { |
140 | 140 |
GSS app = GSS.get(); |
141 | 141 |
if (file != null) { |
142 |
String dateString = RestCommand.getDate(); |
|
143 |
String resource = file.getUri().substring(app.getApiPath().length()-1,file.getUri().length()); |
|
144 |
String sig = app.getCurrentUserResource().getUsername()+" "+RestCommand.calculateSig("GET", dateString, resource, RestCommand.base64decode(app.getToken())); |
|
145 |
return file.getUri() + "?Authorization=" + URL.encodeComponent(sig) + "&Date="+URL.encodeComponent(dateString); |
|
142 |
return file.getUri(); |
|
146 | 143 |
} |
147 | 144 |
return ""; |
148 | 145 |
} |
Also available in: Unified diff