refactor(file): replace window.open with blob download pattern in registry
This commit is contained in:
parent
14195e972f
commit
e5d9800294
9 changed files with 122 additions and 36 deletions
|
|
@ -136,10 +136,6 @@ async function onDownloadFile(id: string, profileId: string) {
|
|||
),
|
||||
)
|
||||
.then(async (res) => {
|
||||
// const data = res.data.downloadUrl;
|
||||
// window.open(data, "_blank");
|
||||
console.log(res.data);
|
||||
|
||||
const downloadUrl = res.data.downloadUrl;
|
||||
const response = await fetch(downloadUrl);
|
||||
const blob = await response.blob();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue