-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Password based file encryption #73
base: master
Are you sure you want to change the base?
Conversation
Adds encryption to uploaded files Fixes issue NITDgpOS#39
Hi. Thanks for contributing to PiZilla! 🎉 (Powered by GitMate.io) |
Adds encryption to uploaded files Fixes issue NITDgpOS#39
…4/PiZilla into feature/file-encryption
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, please restructure your commits, you have multiple commits with same message and do not merge master into your branches. Always fetch the latest master locally and rebase your branch onto that, then push.
@@ -12,21 +13,35 @@ import webpackConfig from './../webpack.config.babel'; | |||
const urlencodedParser = bodyparser.urlencoded({ extended: true }); | |||
const isProduction = process.env.NODE_ENV === 'production'; | |||
const entryPoint = isProduction ? '/build/' : 'http://localhost:8080/'; | |||
const uploadDir = serverConfig.uploads; | |||
const password = 'password'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, no, not a constant, this should be user configurable. Like suppose, when I upload a file and want it to be encrypted, I'll type in a password and share the URL and password with only one person. Only he / she who knows the password would be able to unzip it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok so I should take password from front-end right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
@@ -38,6 +38,7 @@ | |||
"eslint-plugin-react": "^7.3.0", | |||
"express": "^4.15.4", | |||
"file-loader": "^0.11.2", | |||
"formidable": "^1.1.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you also need to kickout multer from dependencies. yarn remove multer
uploadDir | ||
}); | ||
form.parse(req); | ||
form.on('fileBegin', (name, file) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you have two event handlers for the same function?
Adds encryption to uploaded files
Fixes issue #39