From 228d253f30917381ecca68cb3f49d3086db94384 Mon Sep 17 00:00:00 2001 From: Rob Wu Date: Mon, 6 Feb 2017 00:45:51 +0100 Subject: [PATCH] Detect download filename based on full URL --- web/app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/app.js b/web/app.js index f7e76b3e9..e065c8f31 100644 --- a/web/app.js +++ b/web/app.js @@ -737,7 +737,9 @@ var PDFViewerApplication = { } var url = this.baseUrl; - var filename = getPDFFileNameFromURL(url); + // Use this.url instead of this.baseUrl to perform filename detection based + // on the reference fragment as ultimate fallback if needed. + var filename = getPDFFileNameFromURL(this.url); var downloadManager = this.downloadManager; downloadManager.onerror = function (err) { // This error won't really be helpful because it's likely the