Set enctype on your form (this is the #1 forgotten step)
Add enctype="multipart/form-data" to the <form> tag. Without it, browsers silently strip files from the POST body — the form will submit but no attachment ever arrives. For React/SPA submissions via fetch, build a FormData object and pass it as the body; do NOT set Content-Type yourself, the browser sets the multipart boundary.







