domino-rest icon indicating copy to clipboard operation
domino-rest copied to clipboard

Add support for processing a list of files in a multipart

Open FrankW76 opened this issue 2 years ago • 0 comments

Currently you can write code like

//   @Path("callinsickwithattachments")
//   @Consumes(MediaType.MULTIPART_FORM_DATA)
//   @POST SickNoteResponse submitSickNoteWithAttachments(@FormParam("sicknote") SickNote sickNote, @FormParam("attachment") byte[] file);

This will give you the possibility to upload 1 file. However if you want to dynamicly upload a list of files this is currently not possible.

If however you take the generated Factory class of above code and you change ByteArrayProvider to List<ByteArrayProvider> this works as expected. So I think it should be an easy fix if we could provide a List<byte[]> file in the interface and it generates a factory with a List<ByteArrayProvider>

FrankW76 avatar Feb 15 '23 12:02 FrankW76