Announcement

Collapse
No announcement yet.

How to accept Multipart/Form-data files (sent through POST) on HTTP Listener

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to accept Multipart/Form-data files (sent through POST) on HTTP Listener

    I am trying to receive HL7 files, sent over POST requests, convert them to FHIR jsons and write them to a destination. As the incoming files can be large, I want to use POST request with the file attached as Multipart/Form-data.

    I was able to use POST request with file attached as simple binary file in the body. See screenshot. But if I use the multipart feature in mirth HTTP Listener, the data in the file attached is not being picked up. (used a logger.info to print the 'msg' value in Source transformer step).

    Under HTTP Listener Settings in Source tab: I cant use "Parse Multipart" radio button until I select XML as "Message Content". If I select XML, the Inbound DataType of the Source under the Summary tab of the channel changes from HL7 to XML. It does not pick the attached file of the request (but instead the transformer steps create a empty basic FHIR json and pass it on to the Destination of the channel). The attached file of the POST request is being lost.
    Anyone knows how multipart works on HTTP Listener??

    Here is the Channel Group, input file and the output json for the channel with POST working for file attached as binary file.
    Attached below is the channel group:
    Attached Files
Working...
X