Recently, I came across the following situation while working with Mule: I needed to handle an http post that would carry not one but N > 1 uploaded files.
If I were to do this back in the days where I didn’t know about such a thing called “Mule”, I would have needed to:
- Handle a http multipart stream
- Identify all the parts in the message
- Read each file
- Clean up
Of course there’re libraries and frameworks that can help you with this, but all of them still require some level of understanding of the multipart request beneath.