From beabe3831101297c2a1485979357acda5c6bf45d Mon Sep 17 00:00:00 2001 From: owengo Date: Fri, 29 Aug 2025 14:47:12 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=96=BC=EF=B8=8F=20fix:=20Resolve=20`appCo?= =?UTF-8?q?nfig`=20Access=20Before=20Initialization=20in=20Image=20Generat?= =?UTF-8?q?ion=20(#9366)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Olivier Schiavo --- api/server/services/Files/process.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/server/services/Files/process.js b/api/server/services/Files/process.js index d8061fb68e..c5d968c1b4 100644 --- a/api/server/services/Files/process.js +++ b/api/server/services/Files/process.js @@ -929,6 +929,7 @@ async function saveBase64Image( url, { req, file_id: _file_id, filename: _filename, endpoint, context, resolution }, ) { + const appConfig = req.config; const effectiveResolution = resolution ?? appConfig.fileConfig?.imageGeneration ?? 'high'; const file_id = _file_id ?? v4(); let filename = `${file_id}-${_filename}`; @@ -943,7 +944,6 @@ async function saveBase64Image( } const image = await resizeImageBuffer(inputBuffer, effectiveResolution, endpoint); - const appConfig = req.config; const source = getFileStrategy(appConfig, { isImage: true }); const { saveBuffer } = getStrategyFunctions(source); const filepath = await saveBuffer({