[FA-5] Adds image support with proper S3 upload and replacement after upload

This commit is contained in:
gamer147
2025-11-23 21:16:26 -05:00
parent 573a0f6e3f
commit 16ed16ff62
33 changed files with 1321 additions and 267 deletions

View File

@@ -52,10 +52,15 @@ public class NovelpiaAuthMessageHandler : DelegatingHandler
var response = await _httpClient.SendAsync(loginMessage);
using (var streamReader = new StreamReader(response.Content.ReadAsStream()))
{
if (streamReader.ReadToEnd().Contains(LoginSuccessMessage))
var message = await streamReader.ReadToEndAsync();
if (message.Contains(LoginSuccessMessage))
{
_cache.Set(CacheKey, loginKey);
}
else
{
throw new Exception("An error occured while retrieving the login key. Message: " + message);
}
}
}