Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL under OAS: sending blobs to browsers
On Tue, 12 Oct 1999 20:30:11 GMT, fabuley_at_my-deja.com wrote:
>I'm trying to write a PL/SQL function running under the PL/SQL
>cartridge for OAS that will send BLOBs directly back to browsers. The
>ht package has support for uploading and downloading files but it seems
>absurdly limited in its functionality. Does anyone know how to do this?
>Thanks!
Yup.
procedure blob_to_browser is
l_blob blob; l_mimetype varchar2(2000); l_raw raw(4069); l_amt number default 4000; l_off number default 1;
-- -- Load your blob and mimetype into -- l_blob and l_mimetype --
dbms_lob.read( l_blob, l_amt, l_off, l_raw ); htp.prn( utl_raw.cast_to_varchar2( l_raw ) ); l_off := l_off+l_amt; l_amt := 4000;
hope this helps.
chris.
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
--
Christopher Beck
Oracle Corporation
clbeck_at_us.oracle.com
Reston, VA.
![]() |
![]() |