tags:

views:

113

answers:

2

How can i upload csv file to java class in flex ?

+2  A: 
//the following code will post your csv string to the url specified by serverUrl
var loader:URLLoader = new URLLoader();
var req:URLRequest = new URLRequest(serverUrl);
req.data = csvString;
req.method = URLRequestMethod.POST;
loader.load(req);
Amarghosh
Thanks for that,,but how can i upload one file from client into my application.??
Thirst for Excellence
Use FileReference class. Call the browse method to let the user select the file, listen to its select event, and call upload from the select-handler. You cannot upload without user consent. FileReference is the only way to upload files from user machine to server using flash. http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/FileReference.html
Amarghosh
A: 

Thanks for that, but how can i upload one file from client into my application.?? how can user upload file in front-end ??

Thirst for Excellence