paperclipai/paperclip · error
Image exceeds ${MAX_ATTACHMENT_BYTES} bytes
Error message
Image exceeds ${MAX_ATTACHMENT_BYTES} bytes What it means
Error "Image exceeds ${MAX_ATTACHMENT_BYTES} bytes" thrown in paperclipai/paperclip.
Source
Thrown at server/src/routes/assets.ts:224
res.status(201).json({
assetId: asset.id,
companyId: asset.companyId,
provider: asset.provider,
objectKey: asset.objectKey,
contentType: asset.contentType,
byteSize: asset.byteSize,
sha256: asset.sha256,
originalFilename: asset.originalFilename,
createdByAgentId: asset.createdByAgentId,
createdByUserId: asset.createdByUserId,
createdAt: asset.createdAt,
updatedAt: asset.updatedAt,
contentPath: `/api/assets/${asset.id}/content`,
});
});
router.post("/companies/:companyId/logo", async (req, res) => {
const companyId = req.params.companyId as string;
assertCompanyAccess(req, companyId);
try {
await runSingleFileUpload(companyLogoUpload, req, res);
} catch (err) {
if (err instanceof multer.MulterError) {
if (err.code === "LIMIT_FILE_SIZE") {
res.status(422).json({
error: `Image is larger than the ${formatAttachmentSize(MAX_ATTACHMENT_BYTES)} limit`,
});
return;
}
res.status(400).json({ error: err.message });
return;
}
throw err;
}View on GitHub (pinned to 01ad858492)
Solutions
- Reduce the image size below the maximum attachment byte limit, then upload again.
When it happens
Trigger: Thrown at server/src/routes/assets.ts:223 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18).
Data as JSON: /api/errors/f5440b4ccee03831.
Report an issue: GitHub.