ember-cli-form-data
ember-cli-form-data copied to clipboard
How to update thumbnail preview
I'm really happy with using ember-cli-form-data thanks!
Maybe this doesn't have much to do directly with this addon, but I was wondering if there was a standard way in my form of updating a preview thumbnail image when a new file is selected in the input file type.
Thanks!
I use FileReader API (readAsDataURL) and html canvas#drawImage, but that probably doesn't support some older browsers.
Yes I am familiar with that, thanks.
My problem is how to observe when a file is selected and then how to access the pathname.
I tried Ember.$(‘#file-id') but the array element file[0] is undefined until an actual file is selected.