v0.0.12: fix download — window.location вместо a.click()
Deploy drhider / validate (push) Waiting to run
Deploy drhider / validate (push) Waiting to run
This commit is contained in:
+1
-1
@@ -20,7 +20,7 @@ if _sys_path_root not in sys.path:
|
|||||||
sys.path.insert(0, _sys_path_root)
|
sys.path.insert(0, _sys_path_root)
|
||||||
|
|
||||||
# Версия приложения (меняется при изменениях)
|
# Версия приложения (меняется при изменениях)
|
||||||
VERSION = "0.0.11"
|
VERSION = "0.0.12"
|
||||||
|
|
||||||
|
|
||||||
def create_app():
|
def create_app():
|
||||||
|
|||||||
@@ -257,22 +257,12 @@ async function uploadFiles() {
|
|||||||
|
|
||||||
function downloadZip() {
|
function downloadZip() {
|
||||||
if (!currentSid) return;
|
if (!currentSid) return;
|
||||||
const a = document.createElement('a');
|
window.location = '/api/download/' + currentSid;
|
||||||
a.href = '/api/download/' + currentSid;
|
|
||||||
a.download = 'drhider_' + ts() + '.zip';
|
|
||||||
document.body.appendChild(a);
|
|
||||||
a.click();
|
|
||||||
document.body.removeChild(a);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function downloadCsv() {
|
function downloadCsv() {
|
||||||
if (!currentSid) return;
|
if (!currentSid) return;
|
||||||
const a = document.createElement('a');
|
window.location = '/api/csv/' + currentSid;
|
||||||
a.href = '/api/csv/' + currentSid;
|
|
||||||
a.download = 'mapping_' + ts() + '.csv';
|
|
||||||
document.body.appendChild(a);
|
|
||||||
a.click();
|
|
||||||
document.body.removeChild(a);
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user