Below is an example of what you can do after what you already did in your code.
InputStream infile = new FileInputStream(file); //file is the generated file
BufferedInputStream bin = new BufferedInputStream(infile);
Core.storeFileDocumentContent(getContext(), ExcelFileParameter.getMendixObject(), file.getAbsolutePath(), bin);
bin.close();
Note that file in the code is the “MyPresentation.pptx” File object, and ExcelFileParameter is your FileDocument object that you want to download.
My snippet java action code now generating a pptx. Thanks Firas!
Im new to Mendix and have some questions. I am trying to export my data to a .pptx file.
What type of parameter do you use for the Json since you don't do any REST call?
Do I need to import the .jar files somehow or does mendix import them automatically when they are in the userlib folder?