Skip to content
Snippets Groups Projects
Unverified Commit 3b86cd88 authored by Xiao Gui's avatar Xiao Gui
Browse files

maint: simplify with window.open

parent 5b9b1d3a
No related branches found
No related tags found
No related merge requests found
...@@ -68,13 +68,7 @@ export class AtlasDownloadDirective { ...@@ -68,13 +68,7 @@ export class AtlasDownloadDirective {
* n.b. this *needs* to happen in the same invocation chain from when click happened * n.b. this *needs* to happen in the same invocation chain from when click happened
* modern browser is pretty strict on what can and cannot * modern browser is pretty strict on what can and cannot
*/ */
const anchor = document.createElement('a') window.open(`${endpoint}/atlas_download/${task_id}/download`, "_blank")
anchor.href = `${endpoint}/atlas_download/${task_id}/download`
anchor.target = "_blank"
anchor.download = "download.zip"
document.body.appendChild(anchor)
anchor.click()
document.body.removeChild(anchor)
this.#busy$.next(false) this.#busy$.next(false)
} catch (e) { } catch (e) {
this.#busy$.next(false) this.#busy$.next(false)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment