mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #13009 from Snuffleupagus/openOrDownloadData
Move the opening of PDF file attachments into the `DownloadManager`-implementations
This commit is contained in:
commit
8b7dee0aae
5 changed files with 97 additions and 61 deletions
|
@ -1982,11 +1982,11 @@ class FileAttachmentAnnotationElement extends AnnotationElement {
|
|||
* @memberof FileAttachmentAnnotationElement
|
||||
*/
|
||||
_download() {
|
||||
if (!this.downloadManager) {
|
||||
warn("Download cannot be started due to unavailable download manager");
|
||||
return;
|
||||
}
|
||||
this.downloadManager.downloadData(this.content, this.filename, "");
|
||||
this.downloadManager?.openOrDownloadData(
|
||||
this.container,
|
||||
this.content,
|
||||
this.filename
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue