2 Replies Latest reply on Feb 16, 2010 4:16 PM by Raymond Marfurt

    File download with immediate save-as dialog

    Raymond Marfurt Newbie

      My application offers download of large files (>10M). I perfectly managed to show the save-as dialog to save the file (with a a4j:htmlCommandLink). The problem is that the dialog appears only when the file is completly transferred to the client; thus, the client does not realise that the download really startet.

       

      I can't set a Content-Length header, because the data is zipped on the fly, and the file size is not known. I tried to send it in chunks and flush the buffer between, but this has only an effect in firefox. In ie, the dialog still appears at the end of the session.

       

      Any other idea? Is there a possibility to show a loading indicator (ok, this I can already do...), and to remove the indicator after download completion (...don't know how to do that.)??

       

      Regards,

      Ray