Skip to content

Conversation

@pranay414
Copy link
Collaborator

Adds encryption to uploaded files

Fixes issue #39

Adds encryption to uploaded files

Fixes issue NITDgpOS#39
@naveenkumarsangi
Copy link
Member

Hi. Thanks for contributing to PiZilla! 🎉

(Powered by GitMate.io)

Copy link
Member

@naveenkumarsangi naveenkumarsangi 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.

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.

"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