How to download different files from Spring mvc driver

0

Hello everyone how are you? I would like to know if there is any way for my controller method to return dynamically created files, and send them to the view and download them one by one. I have seen examples but only of pdf, and in my case one method returns one or several, one txt, and two csv. I hope you can give me a hand, thank you very much.

    
asked by Juan Manuel Lopez 12.05.2017 в 15:23
source

1 answer

0

Only one file can be downloaded in a single application. What is usually done in these cases is that if there is more than one file, they are all compressed into a zip file and sent to the client.

Java has classes to create zip files without problems.

    
answered by 25.05.2017 в 16:42