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

TypeError: Cannot read property 'file' of undefined #14

Open
Jnchi opened this issue Oct 28, 2019 · 2 comments
Open

TypeError: Cannot read property 'file' of undefined #14

Jnchi opened this issue Oct 28, 2019 · 2 comments

Comments

@Jnchi
Copy link

Jnchi commented Oct 28, 2019

Location: User Profile > Change Profile Picture > Select Image > (any image) > Upload

NODE_ENV=development MONGO_SEED=true npm start
[ . . . TRUNCATED . . . ]
TypeError: Cannot read property 'file' of undefined
    at exports.changeProfilePicture (C:\Users\Jnchi\repos\TallyCTF\modules\users\server\controllers\users\users.profile.server.controller.js:60:76)
    at Layer.handle [as handle_request] (C:\Users\Jnchi\repos\TallyCTF\node_modules\express\lib\router\layer.js:95:5)
    at next (C:\Users\Jnchi\repos\TallyCTF\node_modules\express\lib\router\route.js:131:13)
    at Route.dispatch (C:\Users\Jnchi\repos\TallyCTF\node_modules\express\lib\router\route.js:112:3)
    at Layer.handle [as handle_request] (C:\Users\Jnchi\repos\TallyCTF\node_modules\express\lib\router\layer.js:95:5)
    at C:\Users\Jnchi\repos\TallyCTF\node_modules\express\lib\router\index.js:277:22
    at Function.process_params (C:\Users\Jnchi\repos\TallyCTF\node_modules\express\lib\router\index.js:330:12)
    at next (C:\Users\Jnchi\repos\TallyCTF\node_modules\express\lib\router\index.js:271:10)
    at SessionStrategy.strategy.pass (C:\Users\Jnchi\repos\TallyCTF\node_modules\passport\lib\middleware\authenticate.js:318:9)
    at C:\Users\Jnchi\repos\TallyCTF\node_modules\passport\lib\strategies\session.js:61:12
    at pass (C:\Users\Jnchi\repos\TallyCTF\node_modules\passport\lib\authenticator.js:333:31)
    at deserialized (C:\Users\Jnchi\repos\TallyCTF\node_modules\passport\lib\authenticator.js:345:7)
    at Query.<anonymous> (C:\Users\Jnchi\repos\TallyCTF\modules\users\server\config\users.server.config.js:25:7)
    at C:\Users\Jnchi\repos\TallyCTF\node_modules\kareem\index.js:177:19
    at C:\Users\Jnchi\repos\TallyCTF\node_modules\kareem\index.js:109:16
    at _combinedTickCallback (internal/process/next_tick.js:132:7)
    at process._tickCallback (internal/process/next_tick.js:181:9)

This was tested locally on Windows.

nvm list

    13.0.1
  * 8.16.2 (Currently using 64-bit executable)
@Jnchi
Copy link
Author

Jnchi commented Oct 31, 2019

@Jnchi
Copy link
Author

Jnchi commented Oct 31, 2019

See also: https://github.com/expressjs/multer

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

No branches or pull requests

1 participant