adonespitogo / angular-base64-upload

Converts files from file input into base64 encoded models.
283 stars 121 forks source link

MongoDB Model for this module #82

Closed nathanmrtns closed 8 years ago

nathanmrtns commented 8 years ago

Hi, what is the right schema atribute to sabe this in MongoDB ?

I'm trying to use with this one

var projectSchema = mongoose.Schema({

name: {
    type: String,
    required: true
},
room: {
    type: mongoose.Schema.Types.ObjectId,
    ref: 'Room'
},
members: {
    type: [{
        type: mongoose.Schema.Types.ObjectId,
        ref: 'User'
    }]
},
managers: {
    type: [{
        type: mongoose.Schema.Types.ObjectId,
        ref: 'User'
    }]
},
image: {
  data: Buffer
}

});

But I can get it to work with "data:buffer"