mirror of https://github.com/VERT-sh/VERT.git
fix: download all proper file extension
if downloading all files as a .zip, if the result is a .zip (e.g. converting to docx) it would have the "target" file extension rather than the result. final file seems "broken", but has the wrong extension (.docx instead of .zip)
This commit is contained in:
parent
3cd1989ecd
commit
990027d61b
|
|
@ -350,13 +350,15 @@ class Files {
|
|||
for (let i = 0; i < files.files.length; i++) {
|
||||
const file = files.files[i];
|
||||
const result = file.result;
|
||||
let to = file.to;
|
||||
if (!to.startsWith(".")) to = `.${to}`;
|
||||
|
||||
if (!result) {
|
||||
error(["files"], "No result found");
|
||||
continue;
|
||||
}
|
||||
|
||||
let to = result.to;
|
||||
if (!to.startsWith(".")) to = `.${to}`;
|
||||
|
||||
dlFiles.push({
|
||||
name: file.file.name.replace(/\.[^/.]+$/, "") + to,
|
||||
lastModified: Date.now(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue