Created
August 11, 2020 10:51
-
-
Save bjoerntx/adc606e9b70625168acf6c659c05b41f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var signatureSettings = { | |
signerName: "Tim Typer", | |
signerInitials: "TT", | |
uniqueId: "12345-ABCDE", | |
redirectUrlAfterSignature: null, | |
ownerName: "Document Requestor", | |
signatureBoxName: "txsign", | |
showSignatureBar: true } | |
function readDocument(input) { | |
input = input.srcElement; | |
if (input.files && input.files[0]) { | |
var fileReader = new FileReader(); | |
fileReader.onload = function (e) { | |
TXDocumentViewer.loadDocument( | |
e.target.result.split(',')[1], | |
input.files[0].name, | |
signatureSettings); | |
}; | |
// read the file and convert it to Base64 | |
fileReader.readAsDataURL(input.files[0]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment