Infotexte sind jetzt DAAAAAA GEIL

This commit is contained in:
2023-08-18 11:52:58 +02:00
parent 57c110aea3
commit fc4c96745e
3 changed files with 57 additions and 2 deletions

View File

@ -355,6 +355,12 @@
string mapPath = $"./wwwroot/{imgUrl}";
await image.SaveAsJpegAsync(mapPath);
// Hier speichern wir die Daten in die 'info_texts.txt'-Datei
string infoTextsPath = Path.Combine(_environment.WebRootPath, "generated_images", "info_texts.txt");
string desc = _imageDescription.Replace("\r\n", "").Replace("\n", "").Replace("\r", "");
string newLine = $"{imgUrl}: {request}, {desc}\n";
await File.AppendAllTextAsync(infoTextsPath, newLine);
return imgUrl;
}
else
@ -460,5 +466,8 @@
[Inject]
private NavigationManager NavigationManager { get; set; }
[Inject]
private IWebHostEnvironment _environment { get; set; }
}