htp.init;
— The mime header indicates what the type of the file is (browser will react on that)
owa_util.mime_header(r_bfe.filetype, false);
— use Content-Disposition: attachment to open a dialog box or inline to open in place
htp.p(‘Content-disposition: attachment; filename=’||r_bfe.filename);
htp.p(‘Content-length:’||dbms_lob.getlength(r_bfe.content) );
owa_util.http_header_close;
— Write the BLOB to a browser session ( 9i feature )
wpg_docload.download_file (r_bfe.content);