From 3b53fa599a80f3bc52d575c9aff3cc3420f923ea Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Thu, 9 Mar 2023 21:00:44 +0100 Subject: [PATCH] Remove static temporary file path --- WGneu/Documents/Document.cshtml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WGneu/Documents/Document.cshtml.cs b/WGneu/Documents/Document.cshtml.cs index c6ace6e..d1c4306 100644 --- a/WGneu/Documents/Document.cshtml.cs +++ b/WGneu/Documents/Document.cshtml.cs @@ -50,8 +50,8 @@ namespace WGneu.Documents { } public async Task Generate() { - var pdf = new Utils.TemporaryFile(@"C:\Users\Lorenz\Desktop", ".pdf"); - using (var tmpHtml = new Utils.TemporaryFile(@"C:\Users\Lorenz\Desktop", ".html")) { + var pdf = new Utils.TemporaryFile(".pdf"); + using (var tmpHtml = new Utils.TemporaryFile(".html")) { await File.WriteAllTextAsync(tmpHtml.FilePath, await Render()); await Pdf.Convert(tmpHtml.FilePath, pdf.FilePath); }