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:
Samuel Chantaraud 2014-03-18 16:32:47 -04:00
parent 4379f16346
commit 25ee0e8572
13 changed files with 292 additions and 38 deletions

View file

@ -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);