Mintplex-Labs/anything-llm · error

Error uploading the logo.

Error message

Error uploading the logo.

What it means

Catch block of POST /system/upload-logo: renaming the logo, removing the old custom logo, or persisting the new logo_filename in SystemSettings threw an exception. The endpoint logs the error and returns this message so the client knows the logo was not replaced.

Source

Thrown at server/endpoints/system.js:994

      }

      try {
        const newFilename = await renameLogoFile(request.file.originalname);
        const existingLogoFilename = await SystemSettings.currentLogoFilename();
        await removeCustomLogo(existingLogoFilename);

        const { success, error } = await SystemSettings._updateSettings({
          logo_filename: newFilename,
        });

        return response.status(success ? 200 : 500).json({
          message: success
            ? "Logo uploaded successfully."
            : error || "Failed to update with new logo.",
        });
      } catch (error) {
        console.error("Error processing the logo upload:", error);
        response.status(500).json({ message: "Error uploading the logo." });
      }
    }
  );

  app.get("/system/is-default-logo", async (_, response) => {
    try {
      const currentLogoFilename = await SystemSettings.currentLogoFilename();
      const isDefaultLogo =
        !currentLogoFilename || currentLogoFilename === LOGO_FILENAME;
      response.status(200).json({ isDefaultLogo });
    } catch (error) {
      console.error("Error processing the logo request:", error);
      response.status(500).json({ message: "Internal server error" });
    }
  });

  app.get(
    "/system/remove-logo",

View on GitHub (pinned to 20f6d3546c)

Solutions

  1. Check server logs for the underlying storage error.
  2. Verify the file is a supported image and the storage path is writable, then retry.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at server/endpoints/system.js:980 when the library encounters an invalid state.

Common situations: Uploading the custom logo failed while saving or processing the file.


AI-assisted analysis of Mintplex-Labs/anything-llm@20f6d3546c (2026-08-18). Data as JSON: /api/errors/ce00af204574d0aa. Report an issue: GitHub.