From a2f276e652af9f292f20e9bb3388db93e9a92e56 Mon Sep 17 00:00:00 2001 From: Denis Barbaron Date: Mon, 7 Sep 2020 15:19:55 +0200 Subject: [PATCH 1/2] Fix issue on File Explorer While getting a file on a controlled device, the connection to minicap service was stopping due to the URL redirection. Signed-off-by: Denis barbaron --- res/app/control-panes/explorer/explorer-controller.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/res/app/control-panes/explorer/explorer-controller.js b/res/app/control-panes/explorer/explorer-controller.js index 23c22178e..8c9cf5327 100644 --- a/res/app/control-panes/explorer/explorer-controller.js +++ b/res/app/control-panes/explorer/explorer-controller.js @@ -1,3 +1,7 @@ +/** +* Copyright © 2020 contains code contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0 +**/ + module.exports = function ExplorerCtrl($scope) { $scope.explorer = { search: '', @@ -56,7 +60,7 @@ module.exports = function ExplorerCtrl($scope) { $scope.control.fsretrieve(path) .then(function(result) { if (result.body) { - location.href = result.body.href + '?download' + window.open(result.body.href + '?download', "_blank") } }) .catch(function(err) { From 8a390a9eed656846ec7868b9aafdecd2a28d0d17 Mon Sep 17 00:00:00 2001 From: Denis Barbaron Date: Mon, 7 Sep 2020 16:03:15 +0200 Subject: [PATCH 2/2] replace double quotes by single ones Signed-off-by: Denis barbaron --- res/app/control-panes/explorer/explorer-controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/app/control-panes/explorer/explorer-controller.js b/res/app/control-panes/explorer/explorer-controller.js index 8c9cf5327..3c5de08f1 100644 --- a/res/app/control-panes/explorer/explorer-controller.js +++ b/res/app/control-panes/explorer/explorer-controller.js @@ -60,7 +60,7 @@ module.exports = function ExplorerCtrl($scope) { $scope.control.fsretrieve(path) .then(function(result) { if (result.body) { - window.open(result.body.href + '?download', "_blank") + window.open(result.body.href + '?download', '_blank') } }) .catch(function(err) {