Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> upload file into oracle throug www
Hello
I know how to insert large objects in database (blob) with pl/sql , I also
know how to display them on www, but I'd like to give the opportunity to my
friends to upload some files and I don't know how to do it. I don't know how
to transfer the content of file to the procedure.
I read some former posts on group, and I know that the oracle uploads file
automatically to document_table, name which can be changed by site (DAD
configuration), I saw some procedures,
none of them works. The problem is I don't know the format of document_table !!!
In some documentation I even saw that the you cannot change document_table, ie
OAS 4.XX uses document_content table or something like that ???
my document_table is mytable
Let's have a look at my example;
1.form procedure
procedure uploadForm is
begin
htp.formOpen( '/pls/simpledad/webimg.printthis', 'POST', '
ENCTYPE="multipart/form-data"');
htp.formHidden( 'MAX_FILE_SIZE', '100000'); htp.print( 'Send this file: ' ); htp.print('<INPUT NAME="files" TYPE="file">') htp.formSubmit( NULL, 'Send File'); htp.formClose;
2. upload procedure
procedure printthis( files varchar2, MAX_FILE_SIZE varchar2 ) is
begin
htp.print( files || MAX_FILE_SIZE);
end;
this procedure is only to show that something happened, oracle does the upload automatically (probably)
3. my configuration wdbsvr.app
[DAD_simpledad]
connect_string = reposdb
password = web
username = web
default_page = sample.home
document_table = web.myTable document_path = docs document_proc =
4. SQL> desc mytable;
Name Null? Type ------------------------------- -------- ---- WHO VARCHAR2(100) DESCRIPTION VARCHAR2(255) FILES BLOB MAX_FILE_SIZE VARCHAR2(1024)
mytable is default document table
5. oracle 8.17 + web pl/sql generator installed 6. I don't see any error and there's nothing in my mytable; 7. Where does my server know from which column to use
I'd be grateful for any help
Darek Received on Wed Jul 24 2002 - 02:30:17 CDT