Displaying progressbar for file upload

后端 未结 3 1135
名媛妹妹
名媛妹妹 2020-12-21 16:18

I need to create an application where I can add files for upload. As I add items for upload, a progressbar should be displayed along with each item added. And when I click f

3条回答
  •  长情又很酷
    2020-12-21 16:20

    Here are two great examples of Flex file uploaders (using HTTP):

    • Flex File Uploader using PHP, with source.
    • Merb and Adobe AIR File Uploader, with source.

    alt text http://blog.vixiom.com/uploads/merb_air_upload.png

    In order to make the above two examples work together to achieve the desired result (multiple file uploader, one ProgressBar per preloader, in Flex), all you need to do is:

    1. Download the Flex File Uploader PHP Project
    2. Download the Merb AIR Uploader and copy/paste the "UploadProgressComponent.mxml" somewhere into the PHP project (copy to src/UploadProgressComponent.mxml for now).
    3. Replace the DataGrid with a List and a Custom ItemRenderer in FileUpload.mxml in the Flex File Uploader PHP Project.

    Replace this:

    
        
            
            
        
      
    

    with this:

      
    

    The result: Multiple file uploader in Flex, with a custom ItemRenderer that has a ProgressBar for each FileReference. Uploads to a PHP script, which you can swap out for anything.

    Should be very easy to customize from there. Let me know if that works, Lance

提交回复
热议问题