Infotexte sind jetzt DAAAAAA GEIL
This commit is contained in:
@ -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; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user