|File input - Retrieving the file||Andrew Joslin||5/7/12 7:44 AM|
I am having trouble getting the chosen file from a file input.
Here is the JSFiddle: http://jsfiddle.net/ADukg/11/
Nothing is shown when I pick a file.
|Re: File input - Retrieving the file||Marcello Nuccio||5/8/12 1:45 AM|
File input type, is not implemented in angular . You can use a dirty hack , or patch angular . I do patch angular, but I don't know how to write tests for it :-(.
Il giorno lunedì 7 maggio 2012 16:44:48 UTC+2, Andy Joslin ha scritto:
|Re: File input - Retrieving the file||Andrew Joslin||5/8/12 5:42 AM|
HI marcello, thanks. I'll probably use the hack for now.
|Re: File input - Retrieving the file||Marcello Nuccio||5/9/12 2:51 AM|
Actually I've posted the wrong hack. Here's the cleaner one (IMHO):
Il giorno martedì 8 maggio 2012 14:42:27 UTC+2, Andy Joslin ha scritto:
|Re: File input - Retrieving the file||D. Zen||5/22/12 8:16 AM|
Here's an update to allow multiple files:
|Re: File input - Retrieving the file||Marcello Nuccio||5/22/12 8:34 AM|
Glad it helped... as I've said, the problem is: how to test it?
Actually, I'm using the patch , not the hack. The patch also supports `accept` attribute, with some quirks due to browsers differences... maybe we should use a custom attribute, for example `ng-accept`...
Il giorno martedì 22 maggio 2012 17:16:10 UTC+2, D. Zen ha scritto:
|Re: [angular.js] Re: File input - Retrieving the file||D. Zen||5/22/12 8:39 AM|
I like the concept of a patch, but I would prefer it to be documented and rolled into the main branch.
In the meantime, this is an acceptable hack. If I get a chance, I will look at how to test your patch.
|Re: [angular.js] Re: File input - Retrieving the file||David Brunner||5/25/12 8:44 PM|
Marcello, Zen, this was extremely helpful. Thank you very much for sharing your solution!