1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Ghost-Admin/app/components/gh-file-input.js
Austin Burdine 2dff7edd3d convert remainder of components to use ember-cli-shims (#101)
follow up from #95
- converts components to use ember-cli-shims
2016-06-30 19:14:25 +01:00

12 lines
357 B
JavaScript

import Ember from 'ember';
import XFileInput from 'emberx-file-input/components/x-file-input';
// ember-cli-shims doesn't export Ember.testing
const {testing} = Ember;
export default XFileInput.extend({
change(e) {
let files = testing ? (e.originalEvent || e).testingFiles : e.target.files;
this.sendAction('action', files);
}
});