file-chooser component Class
This component lets the user choose a list of files from their computer, by drag-and-drop, a file browser, or whatever method the developer wants.
Exposed to parent context (bindable attributes)
files: mutable list of chosen File objectsmultiple: boolean (defaulttrue), whenfalse, only keeps the most recently chosen File in the listonChoose: callback function called each time a file is added, with the new File object as the only argument
Exposed to block context
this: the component object itself, so the block can invoke actions example:{{#file-chooser files=fileList as |component|}} {{input type='file' change=(action 'onFileInputChange' target=component)}} {{/file-chooser}}
Actions
onFileInputChange: handle thechangeevent on a file inputonChooseFile: add a file to the chosen list
Styling
- This component's element has the
drop-zoneclass - While the user is holding dragged files over this component, it
has the
drop-zone-readyclass
