Ghost/core/client/controllers/modals/upload.js

23 lines
546 B
JavaScript
Raw Normal View History

2014-03-31 08:07:05 +04:00
var UploadController = Ember.Controller.extend({
2014-06-06 18:44:09 +04:00
acceptEncoding: 'image/*',
actions: {
confirmAccept: function () {
var self = this;
this.get('model').save().then(function (model) {
self.notifications.showSuccess('Saved');
return model;
}).catch(function (err) {
self.notifications.showErrors(err);
});
},
confirmReject: function () {
return false;
2014-03-31 08:07:05 +04:00
}
}
});
export default UploadController;