I am trying to create a RESTController in a SpringBoot application which will return a zip file as an attachment and a JSON body containing metadata about the zip file, both in the same REST response.
I tried to find examples for Multipart download but most of the examples are about file upload with json body in request. So far I have encountered below post only which seems relevant but does not look elegant as it requires client side specific libraries to receive the response properly.
Can I send an excel file and JSON body with a description of file in same REST API Response
Is there any elegant way to achieve this in SpringBoot where client side implementation is not required? Any pointers on this is appreciated.