On Jul 3, 2015 3:57 PM, <modjkl...@comcast.net> wrote:
>
> I've been looking into fileReference, for example:
>
>     fileReference= new FileReference();
>     fileReference.addEventListener(Event.SELECT, onFileSelected);
>     var txtTypeFilter:FileFilter = new FileFilter( "Text Files (*.txt)" ,
"*.txt" );
>     fileReference.browse([txtTypeFilter]);
>
> Is it true the user needs to specify each file to read in (by selecting
them in a browser window, one by one)?
>

No,  the user can select multiple files at once.

> I have dozens of text files that need to be read, and the user won't have
the patience for this approach.
>
> Ideally the user just specifies a file folder. Then, assume the app knows
all the different files that folder contains, and reads them in.

I don't think selecting a folder and then processing all files is allowed
by the Filereference api.

>
> Is there any way to do this in a web app running in desktop browser, or
must I resort to AIR running on desktop (if AIR, any recommended
approaches)?

In AIR, you can have a folder selected and process all containing files
automatically.  No restrictions here.  You will need to use the File api
instead of the Filereference api.

Thanks,
Om

>
>
> ----- Original Message -----
> From: modjkl...@comcast.net
> To: "apache users" <users@flex.apache.org>
> Sent: Friday, July 3, 2015 3:18:34 PM
> Subject: methods for web app to read text file on client's computer?
>
> Looking for recommendations to read a text file in Flex web app (not AIR).
>
> Does a web app even have permission to read a text file located on the
client's computer?
>
> Text file is comma-separated data arranged in columns. The total number
of lines isn't known ahead of time.
>
> Ideally I'd like to read the file line by line (each line ending with a
\n character), the split the line based on the comma character to identify
and process individual elements.
>
>
>
>

Reply via email to