Zip download done.
This commit is contained in:
parent
2695fc67f3
commit
4fd769cce2
|
@ -138,7 +138,8 @@ const download = async () => {
|
|||
}
|
||||
}
|
||||
// Otherwise, zip and download
|
||||
linkdl(`/zip/${Array.from(sel.keys).join('+')}/download.zip`)
|
||||
const name = sel.keys.length === 1 ? sel.docs[sel.keys[0]].name : 'download'
|
||||
linkdl(`/zip/${Array.from(sel.keys).join('+')}/${name}.zip`)
|
||||
documentStore.selected.clear()
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -190,7 +190,7 @@ async def zip_download(req, keys, zipfile, ext):
|
|||
rel = None
|
||||
if relpar or attr.key in wanted:
|
||||
rel = [*relpar, name] if relpar else [name]
|
||||
wanted.remove(attr.key)
|
||||
wanted.discard(attr.key)
|
||||
if isinstance(attr, DirEntry):
|
||||
q.append((loc, rel, attr.dir))
|
||||
elif rel:
|
||||
|
|
Loading…
Reference in New Issue
Block a user