Answers for "asp net core image server"

C#
-1

asp net core image server

[HttpPost]
public ActionResult RetrieveImage()
{
    Image img = db.Images.OrderByDescending
(i=>i.Id).SingleOrDefault();
    string imageBase64Data = 
Convert.ToBase64String(img.ImageData);
    string imageDataURL = 
string.Format("data:image/jpg;base64,{0}", 
imageBase64Data);
    ViewBag.ImageTitle = img.ImageTitle;
    ViewBag.ImageDataUrl = imageDataURL;
    return View("Index");
}
Posted by: Guest on November-23-2020

Code answers related to "asp net core image server"

C# Answers by Framework

Browse Popular Code Answers by Language