mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #17131 from Snuffleupagus/openOrDownloadData-caching
Re-factor the blob-URL caching in `DownloadManager.openOrDownloadData`
This commit is contained in:
commit
6a6f6f122c
7 changed files with 17 additions and 18 deletions
|
@ -806,7 +806,6 @@ class LinkAnnotationElement extends AnnotationElement {
|
|||
link.href = this.linkService.getAnchorUrl("");
|
||||
link.onclick = () => {
|
||||
this.downloadManager?.openOrDownloadData(
|
||||
this.container,
|
||||
attachment.content,
|
||||
attachment.filename,
|
||||
dest
|
||||
|
@ -2861,11 +2860,7 @@ class FileAttachmentAnnotationElement extends AnnotationElement {
|
|||
* Download the file attachment associated with this annotation.
|
||||
*/
|
||||
#download() {
|
||||
this.downloadManager?.openOrDownloadData(
|
||||
this.container,
|
||||
this.content,
|
||||
this.filename
|
||||
);
|
||||
this.downloadManager?.openOrDownloadData(this.content, this.filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue