From: Johannes Zellner Date: Fri, 7 Apr 2017 14:51:41 +0000 (+0200) Subject: Do not open a new tab for file downloads X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;ds=sidebyside;h=c667d125938bbf6e89c89572646cd06f3e2bffd3;p=perso%2FImmae%2FProjets%2FNodejs%2FSurfer.git Do not open a new tab for file downloads --- diff --git a/frontend/js/app.js b/frontend/js/app.js index bf9b534..0875f14 100644 --- a/frontend/js/app.js +++ b/frontend/js/app.js @@ -138,7 +138,7 @@ function open(entry) { function download(entry) { if (entry.isDirectory) return; - window.open(encode('/api/files/' + sanitize(app.path + '/' + entry.filePath)) + '?access_token=' + localStorage.accessToken); + window.location.href = encode('/api/files/' + sanitize(app.path + '/' + entry.filePath)) + '?access_token=' + localStorage.accessToken; } function up() {