i am trying to upload an image to sails server using ember-cli-file-picker from ember, its successfully uploaded to the sever but couldn't connect its model with another model,
/*************** Ember ********************/
// project mode
import DS from 'ember-data';
var attr = DS.attr;
export default DS.Model.extend({
proImage:DS.belongsTo('pro-image',{ async: true }),
});
// project-image model
import DS from 'ember-data';
var attr = DS.attr;
export default DS.Model.extend({
proUrl: attr('raw'),
proImageID:attr(),
project:DS.belongsTo('project',{ async: true }),
});
how to get the image and its related project get together
Aucun commentaire:
Enregistrer un commentaire