You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DEBUG: Ember : 1.13.7
DEBUG: Ember Data : 1.13.9
DEBUG: jQuery : 1.11.3
Response Information (same behavior when returning no JSON and returning JSON object)
Request URL:http://localhost:3000/api/v2/groups/356
Request Method:PUT
Status Code:200 OK
//model
var Group = DS.Model.extend(Attachable, {
attachmentAs: ['image'],
...
});
// controller
// when file is added i send an event from the component containing the Blob - set in model like this
this.set('model.image', image);
// later on i save the model like this - second call back is being hit.
this.get('model').saveWithAttachment().then(function(result) {
controller.set('saving', false);
controller.transitionToRoute('dashboard.trainer.groups')
}, function(errors) {
controller.set('saving', false);
if(errors.errors) {
controller.set('errorMessages', errors.errors);
} else {
controller.transitionToRoute('dashboard.trainer.groups')
}
});
I'm calling model.saveWithAttachment which is returning a 200 with a JSON response, but it's going to the failure callback.
With .save it goes to the success callback.
Any ideas why the discrepancy?
The text was updated successfully, but these errors were encountered: