QQQ-42 checkpoint of qqq reports

This commit is contained in:
2022-09-19 13:52:43 -05:00
parent b05c5749b4
commit 525389e62e
33 changed files with 1346 additions and 143 deletions

View File

@ -22,6 +22,8 @@
package com.kingsrook.qqq.backend.javalin;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
@ -106,11 +108,24 @@ public class QJavalinProcessHandler
});
});
});
get("/download/{file}", QJavalinProcessHandler::downloadFile);
});
}
/*******************************************************************************
**
*******************************************************************************/
private static void downloadFile(Context context) throws FileNotFoundException
{
// todo context.contentType(reportFormat.getMimeType());
context.header("Content-Disposition", "filename=" + context.pathParam("file"));
context.result(new FileInputStream(context.queryParam("filePath")));
}
/*******************************************************************************
** Init a process (named in path param :process)
**