1 | <html> |
---|
2 | <head> |
---|
3 | <script type="text/javascript" src="jquery.min.js"></script> |
---|
4 | <script type="text/javascript"> |
---|
5 | |
---|
6 | function verifySing() { |
---|
7 | var formData = new FormData(); |
---|
8 | formData.append("upload", $("#file-check-sign")[0].files[0]); |
---|
9 | $.ajax({ |
---|
10 | url: "https://murachi.cenditel.gob.ve/Murachi/0.1/archivos/firmados", |
---|
11 | xhrFields: {withCredentials: true}, |
---|
12 | headers: {"Authorization":"Basic YWRtaW46YWRtaW4="}, |
---|
13 | type: "post", |
---|
14 | dataType: "json", |
---|
15 | data: formData, |
---|
16 | cache: false, |
---|
17 | contentType: false, |
---|
18 | processData: false, |
---|
19 | success: function(response) { |
---|
20 | var responseString = JSON.stringify(response); |
---|
21 | document.getElementById("respuestaVerificacion").innerHTML = responseString; |
---|
22 | }, error: function(response) { |
---|
23 | $("#respuestaVerificacion").html('Error...!!!'); |
---|
24 | } |
---|
25 | }); |
---|
26 | |
---|
27 | } |
---|
28 | |
---|
29 | </script> |
---|
30 | </head> |
---|
31 | <body> |
---|
32 | |
---|
33 | <h2>Verificar la firma electrónica</h2> |
---|
34 | <form enctype="multipart/form-data" action="javaScript:verifySing()" method="post" id="verificar"> |
---|
35 | <br> |
---|
36 | <input id="file-check-sign" class="file" type="file" data-min-file-count="1" name="upload" accept=".pdf"> |
---|
37 | <br> |
---|
38 | <br> |
---|
39 | <button type="submit" class="btn btn-primary">Enviar</button> |
---|
40 | <button type="reset" id="resetVerificacion" class="btn btn-default">Limpiar</button> |
---|
41 | <br> |
---|
42 | <br> |
---|
43 | <div id="respuestaVerificacion"> </div> |
---|
44 | </form> |
---|
45 | |
---|
46 | </body> |
---|
47 | </html> |
---|
48 | |
---|
49 | |
---|