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.28"
|
VERSION = "0.0.29"
|
||||||
|
|
||||||
|
|
||||||
def create_app():
|
def create_app():
|
||||||
|
|||||||
@@ -308,11 +308,15 @@ async function uploadFiles() {
|
|||||||
function downloadZip() {
|
function downloadZip() {
|
||||||
if (!currentSid) return;
|
if (!currentSid) return;
|
||||||
fetch('/api/download/' + currentSid)
|
fetch('/api/download/' + currentSid)
|
||||||
.then(r => r.blob())
|
.then(r => {
|
||||||
.then(blob => {
|
const disp = r.headers.get('Content-Disposition');
|
||||||
|
const m = disp && disp.match(/filename="?(.+?)"?$/);
|
||||||
|
return Promise.all([r.blob(), m ? m[1] : 'drhider.zip']);
|
||||||
|
})
|
||||||
|
.then(([blob, fname]) => {
|
||||||
const a = document.createElement('a');
|
const a = document.createElement('a');
|
||||||
a.href = URL.createObjectURL(blob);
|
a.href = URL.createObjectURL(blob);
|
||||||
a.download = 'drhider.zip';
|
a.download = fname;
|
||||||
document.body.appendChild(a);
|
document.body.appendChild(a);
|
||||||
a.click();
|
a.click();
|
||||||
document.body.removeChild(a);
|
document.body.removeChild(a);
|
||||||
@@ -323,11 +327,15 @@ function downloadZip() {
|
|||||||
function downloadCsv() {
|
function downloadCsv() {
|
||||||
if (!currentSid) return;
|
if (!currentSid) return;
|
||||||
fetch('/api/csv/' + currentSid)
|
fetch('/api/csv/' + currentSid)
|
||||||
.then(r => r.blob())
|
.then(r => {
|
||||||
.then(blob => {
|
const disp = r.headers.get('Content-Disposition');
|
||||||
|
const m = disp && disp.match(/filename="?(.+?)"?$/);
|
||||||
|
return Promise.all([r.blob(), m ? m[1] : 'mapping.csv']);
|
||||||
|
})
|
||||||
|
.then(([blob, fname]) => {
|
||||||
const a = document.createElement('a');
|
const a = document.createElement('a');
|
||||||
a.href = URL.createObjectURL(blob);
|
a.href = URL.createObjectURL(blob);
|
||||||
a.download = 'mapping.csv';
|
a.download = fname;
|
||||||
document.body.appendChild(a);
|
document.body.appendChild(a);
|
||||||
a.click();
|
a.click();
|
||||||
document.body.removeChild(a);
|
document.body.removeChild(a);
|
||||||
|
|||||||
Reference in New Issue
Block a user