If I press a button, a hidden input file can be triggered:
HTML:
<button {{action 'addImage'}}>Click Me!</button>
<input id="addAttach" type="file" accept="application/*, image/*" style="display:none" />
JS (Ember.js):
actions:{
addImage: function(){
Em.$('#addAttach').val('').click();
}
}
But it doesn't work in Chrome on an iPhone.
Aucun commentaire:
Enregistrer un commentaire