i want to upload image using angularjs or html5,Express.jsjs and mongodb.i have followed tutorials i can't able to upload the image to upload folder please some one help me how to do that.below i have given my schema code
my schema
var UserSchema = new Schema({
UserName: {
type: String,
default: '',
trim: true,
},
Avatar: {
type: String,
default: '',
trim: true
},
Email: {
type: String,
default: '',
trim: true
},
Password: {
type: String,
default: '',
trim: true
}
});
i want to upload the image with user details
<form action="/upload" method="post" enctype="multipart/form-data">
Select file to upload:
<input type="file" name="Avatar" id="fileToUpload">
<input type="text" name="UserName" id="name">
<input type="email" name="Email" id="email">
<input type="password" name="Password" id="password">
<input type="submit" value="Upload File" name="submit">
</form>
one more thing i want to store image to some folder like upload and path should be store in database.help me out .thanks for your response