Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Document retrieval after file upload and storage in own table
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
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
![]() |
![]() |