Skip to content

req.files not defined #1

@sonu628

Description

@sonu628

req.files.profileimage is not defined. I think this is because i am using the new version of multer
When using new version of multer if you do not upload any file req.file goes undefine and hence gets an error hence in users.js post request of register you should instead of
if(req.files.profileimage)
you replace with try and catch block like
try {
//rest of the code
}catch(e){
var profileImagename = 'noimage.png';
}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions