moqui / moqui-runtime

The default runtime directory for Moqui Framework
Other
37 stars 79 forks source link

Export multiple CSV files out to browser as a single zip #194

Closed akasiri closed 2 years ago

akasiri commented 2 years ago

When using the "Out to Browser" radio button on the DataExport.xml screen, if the user is trying to export multiple CSV files, automatically group the files into a single .zip file.

This PR also fixes a bug I introduced in my last PR... :/

Feel free to edit / restyle the code in this PR as you see fit.

jonesde commented 2 years ago

Thank you Arzang, those are good fixes/improvements. One thing that comes to mind is maybe the response.setContentType('text/csv') should also go in the if and else blocks for the zip versus non-zip files, so that in the if block for the zip file it can use the zip file content type ('application/zip').