0 Replies Latest reply on Aug 25, 2009 1:30 AM by Vitor Wsis

    Download Server Files.

    Vitor Wsis

      Hi,

      I have this code for download the file "logoFotoClik.jpg" from the server:

       

      <mx:Script>
          <![CDATA[
        
              private function downloadFile():void{
                  var request:URLRequest = new URLRequest("../downloads/logoFotoClik.jpg");
                  var fileRef:FileReference = new FileReference();
                      fileRef.download(request);
              }

       

       

       

          ]]>
      </mx:Script>
          <mx:Canvas height="100%" width="100%">
          
              <mx:Label x="99" y="97" text="Logótipo Lp Fotógrafo"/>
              <mx:LinkButton label="jpg" y="94" x="261" click="downloadFile()"/>
          </mx:Canvas>

       

       

       

      but doesn't work!
      The download window opens, i choose the folder and click "save".
      When i go to the folder is nothing there!!