Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

pranay414
Copy link
Collaborator

Adds encryption to uploaded files

Fixes issue #39

Adds encryption to uploaded files

Fixes issue NITDgpOS#39
@nkprince007
Copy link
Member

Hi. Thanks for contributing to PiZilla! 🎉

(Powered by GitMate.io)

Copy link
Member

@nkprince007 nkprince007 left a 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';
Copy link
Member

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.

Copy link
Collaborator Author

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?

Copy link
Member

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",
Copy link
Member

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) => {
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants