|
|
@ -67,15 +67,22 @@ namespace CoviDok.Controllers |
|
|
|
response.Body["reason"] = "unauthorized"; |
|
|
|
return response; |
|
|
|
} |
|
|
|
try { |
|
|
|
string res = null; |
|
|
|
await MinioHandler.GetImage(BucketName, imageGet.ImageId, (stream) => { |
|
|
|
StreamReader reader = new StreamReader(stream); |
|
|
|
res = reader.ReadToEnd(); |
|
|
|
}); |
|
|
|
|
|
|
|
string res = null; ; |
|
|
|
await MinioHandler.GetImage(BucketName, imageGet.ImageId, (stream) => { |
|
|
|
StreamReader reader = new StreamReader(stream); |
|
|
|
res = reader.ReadToEnd(); |
|
|
|
}); |
|
|
|
|
|
|
|
response.Body["image"] = res; |
|
|
|
return response; |
|
|
|
response.Body["image"] = res; |
|
|
|
return response; |
|
|
|
} |
|
|
|
catch (KeyNotFoundException) |
|
|
|
{ |
|
|
|
response.Status = Status.Error; |
|
|
|
response.Body["reason"] = "Image not found!"; |
|
|
|
return response; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|