Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix(mood-boards): keep downloadExternalImage module-private

[._.]/ Adam Eivy315d8d81b531
diff --git a/server/services/moodBoard/localize.js b/server/services/moodBoard/localize.js
index a2f4c6445d..1afd7969fa 100644
--- a/server/services/moodBoard/localize.js
+++ b/server/services/moodBoard/localize.js
@@ -33,7 +33,7 @@ const IMAGE_HEADERS = { 'User-Agent': UA, Accept: 'image/*' };
* non-image body). The filename is keyed on the URL so repeats are idempotent;
* the format is sniffed from bytes, never trusted from Content-Type.
*/
-export async function downloadExternalImage(url) {
+async function downloadExternalImage(url) {
const res = await fetchPublicBinary(url.trim(), { timeoutMs: IMAGE_TIMEOUT_MS, headers: IMAGE_HEADERS, maxBytes: MAX_IMAGE_BYTES, throwOnUnsafe: false }).catch(() => null);
if (!res?.buffer?.length) return null;
const fmt = detectImageFormat(res.buffer);