Answer
Set the X-IFS-Content-Disposition request header to filename=<base64-encoded-file-name> on the upload request — a missing or incorrectly formatted Content-Disposition header (specifically needing the base64-encoded filename in that exact format) is a common cause of this generic upload-failure error on the final file-upload step of the attachment flow.