2 Replies Latest reply on Dec 21, 2009 6:16 PM by Matt Le Fevre

    Zipping and downloadings files

    pthoopth

      I'm fairly new to flex builder and I could really use some help.  I don't think what I want to do is so unusual but I'm not finding any samples (that work) so I'm really hoping someone can help me.

       

      I have a flex web application that allows the user to to choose multiple files to download.  I would like to zip these files into one zip file and download that to the users machine to whatever folder and file name they choose.  Does anyone have an example of doing this or something similar?  It is the zipping of the files into one that I'm have a problem with.  I believe I have found solutions for allowing the user to browse and download a file but if anyone has any samples I would really appreciate it.  I've been struggling with this for over a week now and not getting anywhere at all and I need to have this done by the end of this month.

       

      Thanks to anyone who can either give me a sample or who can point me to a solution.

        • 1. Re: Zipping and downloadings files
          saisri2k2 Level 4

          I'm sure there is a solution for this. But it involved server side coding like java. By using java you can zip it into a file and then give the link of the zip file to the user.

          • 2. Re: Zipping and downloadings files
            Matt Le Fevre Level 4
            if anyone has any samples I would really appreciate it.

             

            for file downloading to a specific folder, something simple like this:

             

                        private var fileRef:FileReference = new FileReference;
            
                        private function downloadFile(fileLink:String):void
                        {
                            var urlRequest:URLRequest = new URLRequest(fileLink);
                            fileRef.download(urlRequest);
                        }
            

             

            works like a charm.

             

             

            Automated zipping though...i'm pretty stumped on that one.

             

            Only thing i've found that seems to have the right idea is

            here