feat: confirm download for deletion

fixes #216 - see 4605f86c41
This commit is contained in:
Maya 2026-02-19 17:46:06 +03:00
parent 892db30480
commit c9192faedb
No known key found for this signature in database
1 changed files with 19 additions and 0 deletions

View File

@ -664,6 +664,25 @@ export class VertdConverter extends Converter {
this.log(`downloading from ${url}`);
// const res = await fetch(url).then((res) => res.blob());
const res = await downloadFile(url, input);
// confirm download to clean up on server
try {
await fetch(
`${apiUrl}/api/confirm/${msg.data.jobId}/${uploadRes.auth}`,
{
method: "GET",
},
);
this.log(
`confirmed download for file ${input.name}`,
);
} catch (e) {
error(
["converters", this.name],
`failed to confirm download: ${e}`,
);
}
resolve(new VertFile(new File([res], input.name), to));
break;
}