Hi, I tried to add a button that download multiple files (1 excel report and some photos) in the same time. In order to do that, I tried to zip these files, with differents solutions that I found, but for the moment nothing works. I first tried to download the module "Create Zip" on the app Store, and call the Java action "ZipDocuments" in my microflow. It takes 2 parameters, a file document previously created that will contain the files zipped and a List of file documents that contains my 3 files. I created these 2 objects, I added the files to the list and I put the right parameters in the Java action. But when I test it, nothing is downloaded. I tried to see with breakpoints if the file document that should contain the zip was empty, but no, after the java action call it has contents and a size that seems to be well. Afterwards, I tried a second way, that I found over here : https://community.mendix.com/link/questions/6444, (code here : https://pastebin.com/PkJJCxZE). This link gave a code that was similar but not exactly the same, this time there is a return object that is the zip file. I created the java action with the right parameters, I called the it, then when I try to download the returned file, nothing is downloaded again. And I have no errors. Did someone manage to make it work ? I put a picture of my microflow in order that it is clearer. Thank you in advance.
Try using an entity in your own domain model, inherited from System.FileDocument, and not System.FileDocument itself, since you can't put access rules on FileDocument. Create an entity and in 'Generalization', pick System.FileDocument. Configure access rules per user role as needed, then try again. Where a java action expects a FileDocument object, you can put your entity.