Skip to content

Commit d65d950

Browse files
author
Charles-Antoine Mathieu
committed
src-d#207 clean url properly when deleting upload
1 parent a7b549e commit d65d950

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

server/public/js/app.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ plik.controller('MainCtrl', ['$scope', '$api', '$config', '$route', '$location',
434434
var code = $location.search().errcode;
435435
$dialog.alert({status: code, message: err});
436436
$location.search({});
437+
$location.hash("");
437438
}
438439
} else {
439440
// Load current upload id
@@ -677,7 +678,8 @@ plik.controller('MainCtrl', ['$scope', '$api', '$config', '$route', '$location',
677678
$api.removeUpload($scope.upload)
678679
.then(function () {
679680
// Redirect to main page
680-
$location.search('id', null);
681+
$location.search({});
682+
$location.hash("");
681683
$route.reload();
682684
})
683685
.then(null, function (error) {
@@ -695,7 +697,8 @@ plik.controller('MainCtrl', ['$scope', '$api', '$config', '$route', '$location',
695697
});
696698
// Redirect to main page if no more files
697699
if (!$scope.files.length) {
698-
$location.search('id', null);
700+
$location.search({});
701+
$location.hash("");
699702
$route.reload();
700703
}
701704
})

0 commit comments

Comments
 (0)