From 6f79aef03a6c35586327d3346c8da30a09002af4 Mon Sep 17 00:00:00 2001 From: Yury Delendik Date: Mon, 16 Jun 2014 19:06:36 -0500 Subject: [PATCH] Uplift for B2G bug 1009780 - Improve open mechanism for downloads. --- web/viewer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/viewer.js b/web/viewer.js index 0414daa2d..553765f43 100644 --- a/web/viewer.js +++ b/web/viewer.js @@ -2459,9 +2459,12 @@ window.addEventListener('afterprint', function afterPrint(evt) { //#if B2G //window.navigator.mozSetMessageHandler('activity', function(activity) { -// var url = activity.source.data.url; +// var blob = activity.source.data.blob; // PDFJS.maxImageSize = 1024 * 1024; +// +// var url = URL.createObjectURL(blob); // PDFView.open(url); +// // var cancelButton = document.getElementById('activityClose'); // cancelButton.addEventListener('click', function() { // activity.postResult('close');