Commit 71e9dc37 authored by Euan Imperial's avatar Euan Imperial
Browse files

Changed filename download

parent 751d5878
Pipeline #173417 canceled with stages
in 8 minutes and 32 seconds
......@@ -16,7 +16,10 @@ public class PDFResultPage extends MarkdownResultPage {
File markdown = getFile();
resp.setHeader("Content-Disposition", "Inline; filename=" + markdown.getName() + ".pdf");
String file_name = markdown.getName();
String[] parts = file_name.split(".");
resp.setHeader("Content-Disposition", "Inline; filename=" + parts[0] + ".pdf");
ProcessBuilder pb = new ProcessBuilder("pandoc", markdown.getAbsolutePath(), "-o", "result.pdf");
Process p = pb.start();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment