Uploader
July 31st, 2006Although this has been a part of Flash 8 previously, one of the coolest new features of Flex 2 is the ability to upload images and files. Here is a quick little component that allows set the max file size allowed, set the types of files allowed, automatically show the upload progress, and then display the image when the upload is completed. The syntax is simple:
<eFlexComponents:Uploader uploadButtonLabel=”Browse for New Image”
uploadToURL=”http://www.yourdomain.com/uploads/uploader.cfm”
imagesFilter=”*.jpg;*.gif;*.png”
displayNewImage=”true”
displayImagePath=”http://www.yourdomain.coms/uploads”
maxUploadSize=”100000″/>
Here is a ColdFusion (uploader.cfm) sample script to catch the file:
<cffile action=”upload” filefield=”Filedata” destination=”#ExpandPath(’./’)#” nameconflict=”OVERWRITE” />
Right Click on application to view & download Source Code.

Posted by everythingflex



