The attachment body has an incorrect type. Expected byte[] or InputStream

Issue

You are inserting attachments but the task run fails with error "The attachment body has an incorrect type. Expected byte[] or InputStream".

Cause

The cause of this error is usually the list of files in the CSV is not exactly the same as the list of files in the ZIP file or at least one of the files does not have the exact same name as in the CSV (body column).

Solution

You will need to start by validating that the number of files in the ZIP file is the same as the attachments listed in the CSV.
If the count is the same, then you will need to validate that the files are the same and there is no difference in some character.

Have more questions? Submit a request

Comments

Article is closed for comments.