5 Replies Latest reply: Oct 30, 2013 2:05 PM by Mike Kutz RSS

    Download File not opening correctly in Firefox... (Works fine in IE...)

    TexasApexDeveloper

      Running the following code snippet in Oracle 11.2, APEX 4.2.3, IE 10, Firefox 24:

       

      procedure download_to_user

      is   

      t_excel blob;

      t_filename varchar2(200);

       

        begin

           

        t_excel := finish;

        t_filename := 'test.xlsx';

         htp.flush;

         owa_util.mime_header( 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', false );

         htp.print( 'Content-Length: ' || dbms_lob.getlength( t_excel ) );

       

        htp.print( 'Content-disposition: attachment; filename=' || t_filename || ';' );

       

        htp.print( 'Content-Description: Generated by as_xslx' );

       

        owa_util.http_header_close;

       

        wpg_docload.download_file( t_excel );

       

        apex_debug_message.log_message( 'done' );

        end;


      Now the strange part.. It works fine in IE & Chrome when I have it called from a button click on a form, when I try it in Firefox, it returns a garbled file that Firefox thinks IT Should open...  I would think since all the issues we seem to have with IE that this would be the opposite..


      Thank you,


      Tony Miller

      LuvMuffin Software