2016-05-27 15:27:46 +03:00
|
|
|
import Ember from 'ember';
|
|
|
|
import XFileInput from 'emberx-file-input/components/x-file-input';
|
|
|
|
|
2016-06-30 21:14:25 +03:00
|
|
|
// ember-cli-shims doesn't export Ember.testing
|
2016-05-27 15:27:46 +03:00
|
|
|
const {testing} = Ember;
|
|
|
|
|
|
|
|
export default XFileInput.extend({
|
|
|
|
change(e) {
|
|
|
|
let files = testing ? (e.originalEvent || e).testingFiles : e.target.files;
|
|
|
|
this.sendAction('action', files);
|
|
|
|
}
|
|
|
|
});
|