mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 10:15:37 +02:00
Preliminary attachments support
Added a partial Filespec support Added getAttachments in API Added a new attachments view in UI (with a new icon by @shorlander)
This commit is contained in:
parent
4379f16346
commit
25ee0e8572
13 changed files with 292 additions and 38 deletions
|
@ -83,6 +83,18 @@ var DownloadManager = (function DownloadManagerClosure() {
|
|||
});
|
||||
},
|
||||
|
||||
downloadData: function DownloadManager_downloadData(data, filename,
|
||||
contentType) {
|
||||
var blobUrl = PDFJS.createObjectURL(data, contentType);
|
||||
|
||||
FirefoxCom.request('download', {
|
||||
blobUrl: blobUrl,
|
||||
originalUrl: blobUrl,
|
||||
filename: filename,
|
||||
isAttachment: true
|
||||
});
|
||||
},
|
||||
|
||||
download: function DownloadManager_download(blob, url, filename) {
|
||||
var blobUrl = window.URL.createObjectURL(blob);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue