From c9192faedbb4a0b7a5801c2db5eb285a4d8362f0 Mon Sep 17 00:00:00 2001 From: Maya Date: Thu, 19 Feb 2026 17:46:06 +0300 Subject: [PATCH] feat: confirm download for deletion fixes #216 - see https://github.com/VERT-sh/vertd/commit/4605f86c4176866a6c7f871a7059f7482e3013b4 --- src/lib/converters/vertd.svelte.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/lib/converters/vertd.svelte.ts b/src/lib/converters/vertd.svelte.ts index 52adcaf..5792f2f 100644 --- a/src/lib/converters/vertd.svelte.ts +++ b/src/lib/converters/vertd.svelte.ts @@ -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; }