Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: WPG_DOCLOAD

Re: WPG_DOCLOAD

From: DA Morgan <damorgan_at_psoug.org>
Date: Thu, 27 Jul 2006 22:03:14 -0700
Message-ID: <1154019821.129998@bubbleator.drizzle.com>


Tim Arnold wrote:
> "Maxim Demenko" <mdemenko_at_gmail.com> wrote in message
> news:ea5spq$ad4$03$2_at_news.t-online.com...

>> DA Morgan schrieb:
>>> If anyone is using this package I'd appreciate a short paragraph
>>> describing how you are using it?
>>>
>>> Thanks.
>> I am slightly confused - everybody who uses htmldb ( now ApEx ) - are
>> using it - it is the part of core functionality.
>> But you are probably interested in custom implementations, not in what
>> is delivered with oracle out the box ?
>>
>> Best regards
>>
>> Maxim

>
> Yeah, like he said. It is out-of-the-box in ApEx or write your own pl/sql.
> Use it to view/download blobs.
> This is from Burleson's book:
>
> create or replace procedure display_easy_image( p_id number ) as
> s_mime_type varchar2(48);
> n_length number;
> s_filename varchar2(400);
> lob_image blob;
> begin
> select mime_type, dbms_lob.getlength( blob_content ), filename,
> blob_content
> into s_mime_type, n_length, s_filename, lob_image
> from easy_image
> where image_id = p_id;
> owa_util.mime_header( nvl( s_mime_type, 'application/octet' ), FALSE );
>
> -- Set the size so the browser knows how much it will be downloading.
> htp.p( 'Content-length: ' || n_length );
> -- The filename will be used by the browser if the users does a "Save as"
> htp.p( 'Content-Disposition: filename="' || s_filename || '"' );
> owa_util.http_header_close;
> -- Download the BLOB
> wpg_docload.download_file( lob_image );
> end display_easy_image;
> /
>
>
>
> --
>
> -- This is very important. I can't tell you how many times I've
>
> -- forgotten to do this and cost myself time in troubleshooting.
>
> --
>
> grant execute on display_easy_image to public
>
> /

Thanks.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Fri Jul 28 2006 - 00:03:14 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US