File Upload and Download
Date: 8 Oct 2003 06:10:00 -0700
Message-ID: <3d5549c5.0310080510.3ae70aeb_at_posting.google.com>
I am trying the example given in the PL/SQL Webtool kit and it doesn't seem to be working, I am getting the following error:
An application error has occured. Please try again.
Based on the tips from past posts, I have i. granted select/insert/update permissions on OWS_CONTENT, OWS_OBJECT and execute on OWA_CONTENT to the DAD User ii. created public synonyms for the OWS_CONTENT and OWS_OBJECT tables
Here's my code:
--***************testfaa.html******************
<html>
<head>
<title>test upload</title>
</head>
<body>
<p>start form
<FORM
enctype="multipart/form-data"
action="/rad/owa/write_info"
method="POST">
<p>Who:
<INPUT type="text" name="who">
<p>Description:
<INPUT type="text" name="description"><br>
<p>File to upload:
<INPUT type="file" name="file"><br>
<p>
<INPUT type="submit">
</FORM>
<p> end of form
</body>
</html>
--***************write_info.sql****************** create or replace procedure write_info ( who in varchar2, description in varchar2, file in varchar2) as begin
insert into myTable values (who, description, file);
htp.htmlopen; htp.headopen; htp.title('File Uploaded'); htp.headclose; htp.bodyopen; htp.header(1, 'Upload Status'); htp.print('Uploaded ' || file || ' successfully'); htp.bodyclose; htp.htmlclose; exception when others then htp.print('Uploaded ' || file || ' failed'); htp.print('Error Msg ' || sqlerrm); return;
end write_info;
--**************End***************
Any help is greatly appreciated
Anil Received on Wed Oct 08 2003 - 15:10:00 CEST