Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import Ember from 'ember';
import FileField from 'ember-uploader/file-field';
var AttachmentFileUploadComponent;
AttachmentFileUploadComponent = FileField.extend({
multiple: true,
attributeBindings: ["capture", "accept"],
accept: "accept='image//*'",
capture: "camera",
changedFiles:'files', function() {
var files;
files = this.get('files');
if (!Ember.isEmpty(files)) {
this.sendAction('filesChanged', files);
return this.rerender();
export default AttachmentFileUploadComponent;
This uploader uses the Ember-Upload library
<div class="attachment-file-upload">
{{ attachment-file-upload filesChanged='filesChanged' }}
<h3>Here the jQuery try to clean HTML5 raw file upload</h3>
<input id="file" type="file" accept="image//*" capture="camera">
<button id="clear" {{action "reset"}}>
Clear File input
import Ember from 'ember';
export default Ember.Controller.extend({
actions: {
reset: function(){
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.