mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 11:34:24 +03:00
24 lines
573 B
JavaScript
24 lines
573 B
JavaScript
import Ember from 'ember';
|
|
|
|
var UploadController = Ember.Controller.extend({
|
|
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;
|
|
}
|
|
}
|
|
});
|
|
|
|
export default UploadController;
|