mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-02-11 17:55:51 +00:00
user aborts the download
This commit is contained in:
parent
2a4866a679
commit
4d1fe9dd0d
@ -1474,6 +1474,13 @@ class WebBrowser extends LitElement {
|
||||
}
|
||||
writeFile(fileHandle, blob).then(() => console.log("FILE SAVED"))
|
||||
} catch (error) {
|
||||
if (error.name === 'AbortError') {
|
||||
const obj = {};
|
||||
const errorMsg = 'User declined the download';
|
||||
obj['error'] = errorMsg;
|
||||
response = JSON.stringify(obj);
|
||||
break
|
||||
}
|
||||
FileSaver.saveAs(blob, filename)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user