How do I start Workflow from an API with attachments?

Hi,

Using YouTube video Infor OS - Starting a workflow from an API I was able to start a workflow from ION API (also on Postman).

However, we need the ability to have an attachment already in the Workflow (for instance, to have the Purchase Order documents already available for the Approval Chain process).

Workflow attachments are also available for mobile users using InforGo, which is a major advantage over DrillBacks.

 

I've also tried the API /IONAttachment/{ionAttachmentType}/{taskItemId}/upload , I figured that ionAttachmentType should be set to 3 (task), but I get the error :

<IONAttachmentResponse xmlns:i="www.w3.org/.../XMLSchema-instance">
  <ErrorList>
    <FaultError>
      <Code>412</Code>
      <Message>File name is missing</Message>
      <Severity>1</Severity>
    </FaultError>
  </ErrorList>
  <Status>2</Status>
  <AttachmentList i:nil="true" />
</IONAttachmentResponse>

 What am I missing here? Is there another way to POST an attachment?

(IOS 12.0.37 OP)

Thanks,

Jonathan