There is no file uploader, you have to make one, Take a look at this example
You use the flash.net.FileReference
[Bindable] private var resume:FileReference = new FileReference();
[Bindable] private var textTypes:FileFilter = new FileFilter("Text Files
(*.txt, *.rtf, *.doc, *.docx)", "*.txt; *.rtf; *.doc; *.docx");
[Bindable] private var pdfTypes:FileFilter = new FileFilter("PDF Files
(*.pdf)", "*.pdf");
[Bindable] private var allTypes:Array = new Array(textTypes, pdfTypes);
[Bindable] private var resumeName:String = "";
[Bindable] public var FileUpload:TitleWindow;
//remove complete when the resume is completely uploaded. }
private function browseFiles():void{
resume.browse(allTypes);
}
private function selectHandler(evt:Event):void{
//Apply name to text field to allow user to know the file
has been attached to the form
//returns full name with extension
resumeName = resume.name;
}
//IF FORM IS VALIDATED
//Upload resume
var request:URLRequest = new
URLRequest("/yourdocumentpath/fileupload.cfm");
try
{
resume.upload(request);
}
catch (error:Error)
{
var errorMessage:String = "ERROR: Cannot Upload the file. Please
contact [EMAIL PROTECTED] for further support";
var errorTitle:String = "UPLOAD ERROR";
alert = Alert.show(errorMessage, errorTitle);
}
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Joshua Jackson
Sent: Monday, August 11, 2008 10:48 AM
To: [email protected]
Subject: [flexcoders] Upload file component
Dear all,
How do I upload file with Flex? Is there any file uploader component?
I could not find any in the documentation, perhaps I have missed
anything. Could anyone give me some hints?
Best regards,
--
Setting a new landmark.
Blog: http://joshuajava.wordpress.com/
Twitter: http://twitter.com/thejavafreak