Skip to content

Commit

Permalink
🎨 Set nftName as the filename (#7)
Browse files Browse the repository at this point in the history
* 🎨 Set nftName as the filename

* πŸ₯… Guard data name undefined
  • Loading branch information
AuroraHuang22 authored Jul 12, 2024
1 parent 09da604 commit 61162d6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3279,12 +3279,14 @@ function webViewerPostMessage(evt) {
PDFViewerApplication.open({
data: atob(data.data),
originalUrl: data.name,
filename: data.name ? `${data.name}.pdf` : "liker-land_ebook.pdf",
});
break;
case "openArrayBufferFile":
PDFViewerApplication.open({
data: new Uint8Array(data.data),
originalUrl: data.name,
filename: data.name ? `${data.name}.pdf` : "liker-land_ebook.pdf",
});
break;
}
Expand Down

0 comments on commit 61162d6

Please sign in to comment.