This repository has been archived on 2022-08-01. You can view files and clone it, but cannot push or open issues or pull requests.
DEMOS2/static/js/decrypt_event.js

20 lines
487 B
JavaScript
Raw Normal View History

function processFileSKChange(event) {
var files = event.target.files;
if(files !== undefined
&& files[0] !== undefined) {
var reader = new FileReader();
reader.onload = function(e) {
$('input#secret-key').val(reader.result);
};
reader.readAsText(files[0]);
}
}
var filesHandleSK = document.getElementById('files_sk_upload');
if(filesHandleSK) {
filesHandleSK.addEventListener('change', processFileSKChange, false);
}