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)?
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.
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)?
----- Original Message -----
From: [email protected]
To: "apache users" <[email protected]>
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.