diff --git a/guacamole/src/main/webapp/app/client/directives/guacFileBrowser.js b/guacamole/src/main/webapp/app/client/directives/guacFileBrowser.js index 98147f1dd..9e5e047cc 100644 --- a/guacamole/src/main/webapp/app/client/directives/guacFileBrowser.js +++ b/guacamole/src/main/webapp/app/client/directives/guacFileBrowser.js @@ -97,6 +97,17 @@ angular.module('client').directive('guacFileBrowser', [function guacFileBrowser( }; + /** + * Initiates a download of the given file. The progress of the + * download can be observed through guacFileTransferManager. + * + * @param {ManagedFilesystem.File} file + * The file to download. + */ + $scope.downloadFile = function downloadFile(file) { + ManagedFilesystem.downloadFile($scope.client, $scope.filesystem, file.streamName); + }; + }] }; diff --git a/guacamole/src/main/webapp/app/client/templates/guacFileBrowser.html b/guacamole/src/main/webapp/app/client/templates/guacFileBrowser.html index dc5bdf18c..1c3a84567 100644 --- a/guacamole/src/main/webapp/app/client/templates/guacFileBrowser.html +++ b/guacamole/src/main/webapp/app/client/templates/guacFileBrowser.html @@ -25,7 +25,7 @@