0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00
ghost/core/client/app/controllers/modals/upload.js

24 lines
546 B
JavaScript
Raw Normal View History

2015-02-12 21:22:32 -07:00
import Ember from 'ember';
2014-03-31 00:07:05 -04:00
export default Ember.Controller.extend({
notifications: Ember.inject.service(),
2014-06-06 10:44:09 -04:00
acceptEncoding: 'image/*',
actions: {
confirmAccept: function () {
var notifications = this.get('notifications');
this.get('model').save().then(function (model) {
return model;
}).catch(function (err) {
notifications.showAPIError(err);
});
},
confirmReject: function () {
return false;
2014-03-31 00:07:05 -04:00
}
}
});