Feature: Password based file encryption#73
Feature: Password based file encryption#73pranay414 wants to merge 4 commits intoNITDgpOS:masterfrom
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
naveenkumarsangi
left a comment
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
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.
Ok so I should take password from front-end right?
| "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.
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.
why do you have two event handlers for the same function?
Adds encryption to uploaded files
Fixes issue #39