-
Notifications
You must be signed in to change notification settings - Fork 2
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
change to only upload files in allowed routes #17
Conversation
expresswrapper.js
Outdated
this.app[method](route, (req, res) => | ||
{ | ||
try | ||
{ | ||
if (!options || !options.acceptFiles) { |
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.
@raphaelgoms this option should be documented at least as a comment.
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.
I documented in readme. The text is ok?
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.
Looks good to me, although an in code comment would suffice too
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.
Looking again at this, it seems to me, the need of this parameter is not making much sense as it introduces a seemingly unnecessary backward compatibility issue.
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.
@raphaelgoms you will probably have to make changes in KES and HKLib to reflect this modification. KES send files to some routes to be imported in HKBase.
c9d385f
to
6822c20
Compare
The only routes I found using the req.files array were:
@marcelomachado @eltonfss do you know any other routes that this change could affect? |
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.
Changes look ok and have been discussed.
|
Will abort this pull request as it is not essencial at the moment and could require a major release to be generated. Will keep the branch alive for future releases. |
By now I can't remember any other routes. |
Solution to #18 :
options
toExpressWraper._request
function.To allow file upload in a route,
options
should look like{ acceptFiles: true, ... }