Receiving Multiple Files in Upload Using Integrator

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
caseywhite
Posts: 105
Joined: Thu May 26, 2016 1:17 am

Receiving Multiple Files in Upload Using Integrator

Post by caseywhite » Sat Jul 20, 2019 7:30 am

If I add muliple to my input of type="file" (e.g. <input type="file" multiple name="UPLFIL">) I can upload multiple files. The HTTP_CONTENT in Integrator have the same name but different file names.

Using the following Integrator command with a different INDEX value still results in the same file name being returned. Is there a way to receive each of the files uploaded?

If Integrator can't do this, is there a way to handle this with a WAM?

RECEIVE HANDLER(INBOUNDMULTIPART) FILENAME(UPLFIL) INDEX(0)

RECEIVE HANDLER(INBOUNDMULTIPART) FILENAME(UPLFIL) INDEX(1)

------WebKitFormBoundaryAzwmC7tuDLbI5SpY
Content-Disposition: form-data; name="UPLFIL"; filename="test.txt"
Content-Type: text/plain

test
------WebKitFormBoundaryAzwmC7tuDLbI5SpY
Content-Disposition: form-data; name="UPLFIL"; filename="test2.txt"
Content-Type: text/plain

test2
------WebKitFormBoundaryAzwmC7tuDLbI5SpY--

Post Reply