
<FileUploader
id="fileUploader"
name="myFileUpload"
width="400px"
tooltip="Upload .cer file"
change="handleUploadComplete"/>
handleUploadComplete: function(oEvent) {
var file = oEvent.getParameter("files") && oEvent.getParameter("files")[0];
if (file && window.FileReader) {
var reader = new FileReader();
reader.onload = function(evn) {
var certificate = evn.target.result; //string in CER
//Now lets format the complete string, so that the key is in single line
certificate = certificate.split("\n");
formated_certificate = certificate.slice(1, certificate.length - 2).join("");
};
reader.readAsText(file);
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
5 | |
2 | |
2 | |
2 | |
2 | |
2 | |
2 | |
2 | |
2 |