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: File Uploads With OAS

Re: File Uploads With OAS

From: MaiChen <maichen_at_erols.com>
Date: Wed, 26 May 1999 18:23:29 -0400
Message-ID: <7ihs96$h38$1@autumn.news.rcn.net>


I know there is a way to do it if you use PL/SQL catridge, no code needed. in your html page, use a form like:
<form method="psot" action="/test/upload" enctype="multipart/form-data"> File Name To Be Uploaded<input type="file" name="file><input type='submit" name="Go">
</fom>

This will give you a form with a browse button to open a file open dialog box. You select a file then
click submit botton, the file is then uploaded into websys.ows_content table's content column which is
a long raw datatype.

You need to have the ows_standarfd role granted to the user associated with you DAD.

(It sometimes don't work and you get a error message dialog box (IE4) saying there is no enough
space to process the command or something like this. I couldn't figure it out why.)

After that you can use owa_content package to get attributes or delete the document.
I try to write the long raw column into a OS file by converting long raw data into varchar2
(utl_raw.cast_to_varchar2) and dump it to a OS file, but the result is not right. The uploaded
file is a gif, but the the dump file is not displayed correctly. Don't know why.

You can also use Perl catridge to achive the file upload, but you must use cgi-lib.pl to do it.
OAS comes with a modified cgi-lib.pl call mycgi-lib.pl in your $ORAWEB_HOME directory,
don't remember exactly where. You have to write your own perl script to save the file to disk.
I will try to use this way in next few days to see if I can get it to work.

Hope this helps.

Shaojie

Super Kev wrote in message <7igkf4$co4$1_at_taliesin.netcom.net.uk>...
>Has anybody out there had any luck uploading files from a client machine to
>the server using OAS....
>
>Can the Perl cartridge be used to do this ????? or is there an easier
>method ????
>
>Or is there a bloody difficult method ????
>
>Is there any method ??????
>
>
>
>--
>Cheers
>
>Steve Bright
>
>steve.bright_at_capgemini.co.uk
>
>
>
Received on Wed May 26 1999 - 17:23:29 CDT

Original text of this message

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