Mintplex-Labs/anything-llm · error

No logo file provided.

Error message

No logo file provided.

What it means

Input validation on POST /system/upload-logo: the multipart request arrived without a file (request.file or originalname missing), meaning no logo was attached or the upload middleware rejected it silently. Returns HTTP 400 before any processing.

Source

Thrown at server/endpoints/system.js:969

            : error || "Failed to remove profile picture.",
        });
      } catch (error) {
        console.error("Error processing the profile picture removal:", error);
        response.status(500).json({ message: "Internal server error" });
      }
    }
  );

  app.post(
    "/system/upload-logo",
    [
      validatedRequest,
      flexUserRoleValid([ROLES.admin, ROLES.manager]),
      handleAssetUpload,
    ],
    async (request, response) => {
      if (!request?.file || !request?.file.originalname) {
        return response.status(400).json({ message: "No logo file provided." });
      }

      if (!validFilename(request.file.originalname)) {
        return response.status(400).json({
          message: "Invalid file name. Please choose a different file.",
        });
      }

      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({

View on GitHub (pinned to 20f6d3546c)

Solutions

  1. Attach a logo file to the request.
  2. Use multipart/form-data with the correct file field name.
Defensive patterns

Strategy: validation

When it happens

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

Common situations: The logo upload endpoint was called without a file.


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