Commit 38a41c6b authored by dtati's avatar dtati

third commit

parent c33f0cfe
...@@ -113,9 +113,11 @@ h1 { ...@@ -113,9 +113,11 @@ h1 {
} }
h2 { h2 {
margin: 0; margin: 0;
width: 300px;
} }
#multi-step-form-container { #multi-step-form-container {
margin-top: 5rem; margin-top: 5rem;
padding: 2%;
} }
.text-center { .text-center {
text-align: center; text-align: center;
...@@ -387,9 +389,11 @@ body { ...@@ -387,9 +389,11 @@ body {
} }
/* drag and drop style */ /* drag and drop style */
.code-json{ .code-json{
text-wrap: wrap;
border: 2px dashed #f0f2f5; border: 2px dashed #f0f2f5;
padding: 1rem; padding: 1rem;
height: 100%; height: 100%;
width: 100%;
pre{ pre{
background-color: #f0f2f5; background-color: #f0f2f5;
padding: 1rem; padding: 1rem;
......
...@@ -10,6 +10,7 @@ const SkyIdentification = () => { ...@@ -10,6 +10,7 @@ const SkyIdentification = () => {
const [responseLiveness, setResponseLiveness] = useState(null); const [responseLiveness, setResponseLiveness] = useState(null);
const [responseFaceMatching, setResponseFaceMatching] = useState(null); const [responseFaceMatching, setResponseFaceMatching] = useState(null);
const [displaybtn, setdisplaybtn] = useState(null); const [displaybtn, setdisplaybtn] = useState(null);
const [imageSrc, setImageSrc] = useState("/assets/CINcrt.jpg");
const handleFileChange = (event) => { const handleFileChange = (event) => {
readImage(event.target.files[0]); readImage(event.target.files[0]);
...@@ -19,6 +20,10 @@ const SkyIdentification = () => { ...@@ -19,6 +20,10 @@ const SkyIdentification = () => {
const reader = new FileReader(); const reader = new FileReader();
reader.readAsDataURL(file); reader.readAsDataURL(file);
setSelectedFile(file); setSelectedFile(file);
reader.onload = function () {
setImageSrc(reader.result);
};
console.log(file)
skyid_extract_info_from_doc_request(file, responseLogin.response_data.access_token); skyid_extract_info_from_doc_request(file, responseLogin.response_data.access_token);
}; };
...@@ -158,6 +163,7 @@ const SkyIdentification = () => { ...@@ -158,6 +163,7 @@ const SkyIdentification = () => {
return ( return (
<div className="main_container"> <div className="main_container">
<br/>
<div> <div>
<img src="/assets/IndatacoreIdentity.png" className="IndatacoreIdentity" alt="" /> <img src="/assets/IndatacoreIdentity.png" className="IndatacoreIdentity" alt="" />
</div> </div>
...@@ -167,9 +173,12 @@ const SkyIdentification = () => { ...@@ -167,9 +173,12 @@ const SkyIdentification = () => {
<div id="multi-step-form-container"> <div id="multi-step-form-container">
<input type="file" onChange={handleFileChange} /> <input type="file" onChange={handleFileChange} />
<img src={`${imageSrc}`} />
<br/> <br/>
{responseLogin && ( {responseLogin && (
<div> <div className='code-json'>
<br/>
<h2>Server Response Login :</h2> <h2>Server Response Login :</h2>
<pre>{JSON.stringify(responseLogin, null, 2)}</pre> <pre>{JSON.stringify(responseLogin, null, 2)}</pre>
</div> </div>
...@@ -177,7 +186,7 @@ const SkyIdentification = () => { ...@@ -177,7 +186,7 @@ const SkyIdentification = () => {
<br /> <br />
{responseOcr && ( {responseOcr && (
<div> <div className='code-json'>
<h2>Server Response OCR:</h2> <h2>Server Response OCR:</h2>
<pre>{JSON.stringify(responseOcr, null, 2)}</pre> <pre>{JSON.stringify(responseOcr, null, 2)}</pre>
</div> </div>
...@@ -188,7 +197,7 @@ const SkyIdentification = () => { ...@@ -188,7 +197,7 @@ const SkyIdentification = () => {
{displaybtn && ( {displaybtn && (
<button onClick={startScanFace}>Start Scan Face</button> <button onClick={startScanFace}>Start Scan Face</button>
)} )}
<div> <div className='code-json'>
<br /> <br />
{responseLiveness && ( {responseLiveness && (
<div> <div>
...@@ -200,7 +209,7 @@ const SkyIdentification = () => { ...@@ -200,7 +209,7 @@ const SkyIdentification = () => {
<br /> <br />
<div> <div>
{responseFaceMatching && ( {responseFaceMatching && (
<div> <div className='code-json'>
<h2>Server Response Face Matching :</h2> <h2>Server Response Face Matching :</h2>
<pre>{JSON.stringify(responseFaceMatching, null, 2)}</pre> <pre>{JSON.stringify(responseFaceMatching, null, 2)}</pre>
</div> </div>
......
export default { export default {
// information sent after creation of applicationId by mail // information sent after creation of applicationId by mail
OCR_url : "***", OCR_url : "https://saas.ms.sup1.idc.skyidentification.com:7001/extract_info_from_document",
OCR_url_status : "***", OCR_url_status : "https://saas.ms.sup1.idc.skyidentification.com:7001/skyid_ocr_status",
LIVENESS_url : "***", LIVENESS_url : "https://saas.ms.sup1.idc.skyidentification.com:4432/check_liveness",
FACE_MATCHING_url : "***", FACE_MATCHING_url : "https://saas.ms.sup1.idc.skyidentification.com:7008/compare_multi_doc_vs_selfie",
skyid_fa_sdk_params_url : "***", skyid_fa_sdk_params_url : "https://saas.ms.sup1.idc.skyidentification.com:7008/",
Recover_Face_Matching_Result_URL : "***", Recover_Face_Matching_Result_URL : "***",
institution_id : "***", institution_id : "042",
skyid_fa_sdk_user : "***", skyid_fa_sdk_user : "demo.skyid",
skyid_fa_sdk_password : "***", skyid_fa_sdk_password : "4GH1Kw@vx$*K003x",
skyid_fa_sdk_token : "***", skyid_fa_sdk_token : "042405620988672110134531288085084",
skyid_fa_sdk_appId : "***", skyid_fa_sdk_appId : "demo.saas.web.skyid.idc",
setFileImage(my_selfie_canvas) { setFileImage(my_selfie_canvas) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment