I'm trying to upload a text file from a html form.
Is there any example on how to get the text-file from the HttpHandler
I once used the following code:
Builder builder = FormParserFactory.builder();
final FormDataParser formDataParser = builder.build().createParser(exchange);
if (formDataParser != null) {
exchange.startBlocking();
FormData formData = formDataParser.parseBlocking();
for (String data : formData) {
for (FormData.FormValue formValue : formData.get(data)) {
if (formValue.isFile()) {
// process file here: formValue.getFile();
}
}
}
}