client-encrypt-file-upload
A client side file encryptor for Node.js.
Installation
Add it to your node.js project via:
npm install client-encrypt-file-upload --save
Usage
As this is a client side script you'll need to compile this module and it's dependencies using browserify or something similar
browserify node_modules/client-encrypt-file-upload/dist/index.js -o bundle.js
To encrypt a file upload:
document.addEventListener('DOMContentLoaded',function() {
document.querySelector('input[name="input_4"]').onchange=changeEventHandler;
},false);
function changeEventHandler(event) {
encryptFile(event.target.files[0], 'bla-bla-bla-bla-bla', function(response){
console.log(response.type);
console.log(response.data);
});
}