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 -> Document retrieval after file upload and storage in own table

Document retrieval after file upload and storage in own table

From: Ludwig Macko <ludwig.macko_at_genedata.com>
Date: Thu, 02 Dec 1999 10:08:45 +0100
Message-ID: <3846371D.20A652B@genedata.com>


Hi,

Within a PL/SQL application served through the PL/SQL cartridge on a OAS 4.0 I would like to let people upload a document through the file upload functionality and let them retrieve those documents again. The user has to specify the document mime type upon upload, the document gets stored in the db in a blob and upon retrieval I would like to set the mime header content-type correctly and send the file to the clients browser.

As far as I found, the file upload stores the upload content in a table, which is OAS internal. You just get the file name as a handle to the corresponding data. So theoretically I could get that data out of the table using the content related procedures. So far so good, although it smells like a hack.

Now when I send the data back, I have the problem, that there is no functionality besides download_file, which would allow non-text i.e. binary data be sent to the client. The mime header can be set with

        owa_util.mime_header(ccontent_type => THE_CONTENT_TYPE);

As a workaround I can see something like

  1. Write the blob stuff back into the ows content tables
  2. call download_file

However this does not appear to me to be very elegant. Has anybody some experience with such problems of dcument storage and retrieval?

Platform: Oracle8 and OAS 4.0

Many thanks for your help in advance

Ludwig Macko Received on Thu Dec 02 1999 - 03:08:45 CST

Original text of this message

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