# Greenhouse 413 "Payload Too Large" on a 25MB portfolio PDF upload

## TL;DR
The 25MB PDF exceeds what the attachment endpoint accepts, so shrink the file or stop attaching the portfolio. Fix: compress the PDF to a few MB, or store the portfolio externally and link it on the candidate record instead of uploading it. A 25MB "resume" is a portfolio; treat it like one.

## Error
```text
413 Payload Too Large
POST resume attachment, 25MB PDF
```

## Steps
1. Check the actual file size and content: a 25MB PDF is almost always image-heavy pages.
   Expected: you confirm the size and see it is a portfolio, not a text resume.
2. Compress it: downsample embedded images to screen resolution and re-export; a PDF optimizer does this in one pass.
   Expected: the file drops to a few MB with readable text.
3. If it is still large or it is genuinely a portfolio, do not attach it: upload the file to your own storage and add the URL to the candidate's profile or cover letter field.
   Expected: reviewers get the full portfolio with no 413.
4. Retry the attachment with the compressed file.
   Expected: 201 Created on the attachment endpoint.
5. Add a pre-upload size check in the agent: files over a few MB get compressed or linked automatically, never uploaded raw.
   Expected: the 413 stops happening.

## Use this when
- Harvest API attachment uploads 413
- the agent attaches portfolios or work samples as resumes
- scraped files are uploaded without size checks
- bulk imports include large PDFs

## Not for this skill when
- the upload fails with 422 (check the attachment parameters)
- small files also fail (that is auth or endpoint trouble, not size)
- the file is fine but parsing produces garbage (that is a parser problem)

## Variant phrasings
- "Greenhouse attachment too large"
- "413 uploading resume Harvest API"
- "portfolio PDF too big Greenhouse"
- "resume attachment size limit"

## Why it happens
Attachment endpoints cap request sizes to protect the API, and agents that upload whatever file they found hit the cap on image-heavy PDFs. A 25MB file also slows parsing and bloats the candidate record. The fix is on the file, not the API: compress or link.

## Edge cases
- Compression can garble text layers; verify the text is still selectable after optimizing.
- Password-protected PDFs fail parsing even when small; ask the candidate for an unlocked copy.
- If you link externally, make sure the link is stable and access-controlled per your data policy.
- Keep the original filename so recruiters recognize it.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_FSZK8QnerYMCrSjhTW5AEA
