From b29a0190ed4eb624112072b4821acd509eb9e4bc Mon Sep 17 00:00:00 2001 From: Chr1st1anG <73988455+Chr1st1anG@users.noreply.github.com> Date: Fri, 13 Feb 2026 00:01:03 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(figgos):=20resolve=20storage?= =?UTF-8?q?=20key=20to=20URL=20before=20downloading=20fusion=20parent=20im?= =?UTF-8?q?ages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- .../apps/backend/src/generation/generation.service.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/figgos/apps/backend/src/generation/generation.service.ts b/apps/figgos/apps/backend/src/generation/generation.service.ts index e78b2481f..b30ede2ce 100644 --- a/apps/figgos/apps/backend/src/generation/generation.service.ts +++ b/apps/figgos/apps/backend/src/generation/generation.service.ts @@ -207,9 +207,11 @@ export class GenerationService { } } - private async downloadAndConvertImage(imageUrl: string): Promise { - const res = await fetch(imageUrl); - if (!res.ok) throw new Error(`Failed to download image: ${res.status}`); + private async downloadAndConvertImage(imageKey: string): Promise { + const url = this.storageService.getPublicUrl(imageKey); + this.logger.log(`Downloading image: ${url}`); + const res = await fetch(url); + if (!res.ok) throw new Error(`Failed to download image: ${res.status} from ${url}`); const webpBuffer = Buffer.from(await res.arrayBuffer()); return sharp(webpBuffer).jpeg({ quality: 85 }).toBuffer(); }