From 501a8773b80291867b0b81573097509200a2efd9 Mon Sep 17 00:00:00 2001 From: dkanada Date: Sun, 12 Apr 2020 23:53:30 +0900 Subject: [PATCH] pass title and filename to native shell --- src/components/filedownloader.js | 2 +- src/components/itemcontextmenu.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/filedownloader.js b/src/components/filedownloader.js index a8b45ab106..6f1bd3ff2a 100644 --- a/src/components/filedownloader.js +++ b/src/components/filedownloader.js @@ -4,7 +4,7 @@ export function download(items) { if (window.NativeShell) { items.map(function (item) { - window.NativeShell.downloadFile(item.url); + window.NativeShell.downloadFile(item); }); } else { multiDownload(items.map(function (item) { diff --git a/src/components/itemcontextmenu.js b/src/components/itemcontextmenu.js index 9d683aa27c..185d94405d 100644 --- a/src/components/itemcontextmenu.js +++ b/src/components/itemcontextmenu.js @@ -339,7 +339,9 @@ define(["apphost", "globalize", "connectionManager", "itemHelper", "appRouter", fileDownloader.download([{ url: downloadHref, itemId: itemId, - serverId: serverId + serverId: serverId, + title: item.Name, + filename: item.Path.replace(/^.*[\\\/]/, '') }]); getResolveFunction(getResolveFunction(resolve, id), id)(); });