Open safar opened 7 years ago
Multipart parsing is currently not natively supported by Web Actors. You have a few options: you can either parse the buffer using a library such as Apache Commons FileUpload, or you can handle the upload in a different servlet resource and use Servlet 3's native support for multipart.
Should Web Actors support multipart natively? Is it a right fit for the actor paradigm? Is using a separate servlet for uploads not a good solution?
I don't see big advantages offered by specifically supporting multipart in Web Actors. @safar Why would you like to use Web Actors specifically in this case and won't some other method do? For example Netty seems to have a dedicated handler.
I have mixed form with text and file input fields which is being processed by a WebActor. I have to be able to read text input fields by their key and File contents from the same message.
I have used code below to read sent request using WebActor using Netty:
this is the output
Are we intended to parse these messages manually? Is there a method which can read File part of HttpRequest directly which I'm unaware of? What is the easiest way to read a file from a multipart HttpRequest received by a WebActor?