diff --git a/EnotaryoPH/EnotaryoPH.Web/Pages/Principal/IdentificationDocument/IdentificationDocument.cshtml b/EnotaryoPH/EnotaryoPH.Web/Pages/Principal/IdentificationDocument/IdentificationDocument.cshtml
index 55342bc..c791d5c 100644
--- a/EnotaryoPH/EnotaryoPH.Web/Pages/Principal/IdentificationDocument/IdentificationDocument.cshtml
+++ b/EnotaryoPH/EnotaryoPH.Web/Pages/Principal/IdentificationDocument/IdentificationDocument.cshtml
@@ -11,10 +11,17 @@
@@ -23,6 +30,7 @@
@section Scripts {
+
}
\ No newline at end of file
diff --git a/EnotaryoPH/EnotaryoPH.Web/Pages/Principal/IdentificationDocument/IdentificationDocument.cshtml.cs b/EnotaryoPH/EnotaryoPH.Web/Pages/Principal/IdentificationDocument/IdentificationDocument.cshtml.cs
index fdca360..15fe248 100644
--- a/EnotaryoPH/EnotaryoPH.Web/Pages/Principal/IdentificationDocument/IdentificationDocument.cshtml.cs
+++ b/EnotaryoPH/EnotaryoPH.Web/Pages/Principal/IdentificationDocument/IdentificationDocument.cshtml.cs
@@ -1,5 +1,6 @@
using EnotaryoPH.Data;
using EnotaryoPH.Web.Common.Models;
+using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Mvc.Rendering;
@@ -104,6 +105,23 @@ namespace EnotaryoPH.Web.Pages.Principal.IdentificationDocument
return new OkObjectResult(true);
}
+ [AllowAnonymous]
+ public IActionResult OnGetViewImage()
+ {
+ if (IdentificationDocument_UID == Guid.Empty)
+ {
+ return NotFound();
+ }
+
+ var identificationDocument = _notaryoDBContext.IdentificationDocuments.FirstOrDefault(e => e.IdentificationDocument_UID == IdentificationDocument_UID);
+ if (identificationDocument == null)
+ {
+ return NotFound();
+ }
+
+ return File(identificationDocument.File, "image/jpg");
+ }
+
private void LoadIdentificationDocumentTypes()
{
var lookupIdentificationTypes = _notaryoDBContext.LookupData.AsNoTracking().Include(e => e.LookupDataValues).FirstOrDefault(e => e.Name == "Identification Types");