mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-17 20:50:44 +00:00
QQQ-42 checkpoint of qqq reports
This commit is contained in:
@ -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)
|
||||
**
|
||||
|
Reference in New Issue
Block a user