The failed file most likely crossed Onboarding's Large Files API threshold, while the successful file used the direct Apex upload route. The HTTP 500 occurred while the Large Files Service was obtaining authorization for the org; it does not mean example.png is corrupt.
Record Files uses two upload routes:
POST /v1/fileUpload on the Large Files Service, which requires the org to be onboarded on the 3B Authorization Server.A browser console line like this confirms that the failed file used the second route:
Upload file via Large Files API [example.png]
Filename, MIME type and file contents do not affect authorization. A configured maxFileSizeMb violation would instead be rejected with a file-size validation message.
Compare the two file sizes. If the failed file is above approximately 2.25 MB and the successful file is below it, that explains why only one used the Large Files route.
Start a fresh Onboarding or portal session and retry. Session keys are time-limited, so a long-open page may hold an expired key.
Confirm the org is onboarded.
If the error persists, re-authorize the org: open https://auth.3b4sf.com/, enter the same Org ID with the current My Domain, Client ID and Client Secret, then authorize as the integration user. See Authorization Server.
If it still fails, contact 3B support with the time of the failure and the org ID.
Temporary workaround: resize or compress the file so its base64 payload stays below 3,000,000 bytes. This keeps it on the direct Apex route.