|
@ -45,8 +45,9 @@ namespace CoviDok.Controllers |
|
|
try |
|
|
try |
|
|
{ |
|
|
{ |
|
|
Session s = await Handler.GetSession(post.SessionId); |
|
|
Session s = await Handler.GetSession(post.SessionId); |
|
|
Console.WriteLine("ImagesController:OnPostImage - Incoming request, ID: " + post.SessionId + ", payload: " + post.File.Length); |
|
|
Console.WriteLine("ImagesController:OnPostImage - Incoming request, SessionID: " + post.SessionId + ", payload: " + post.File.Length); |
|
|
string id = Cuid.Generate(); |
|
|
string id = Cuid.Generate(); |
|
|
|
|
|
Console.WriteLine("ImagesController:OnPostImage - Incoming request, Uploaded image of " + post.SessionId + " will be " + id); |
|
|
StorageResult Result = await MinioHandler.UploadImage(BucketName, MakeStream(post.File), post.File.Length, id); |
|
|
StorageResult Result = await MinioHandler.UploadImage(BucketName, MakeStream(post.File), post.File.Length, id); |
|
|
Console.WriteLine("ImagesController:OnPostImage - Request successful, uploaded " + id); |
|
|
Console.WriteLine("ImagesController:OnPostImage - Request successful, uploaded " + id); |
|
|
if (!Result.Success) response.Status = Status.Error; |
|
|
if (!Result.Success) response.Status = Status.Error; |
|
|