Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Passing blob values to a function

425446Feb 18 2008 — edited Feb 19 2008
Hi,

I have been following the mod_plsql guide, which has a section on File Upload.
The html page code is as below:
<html>
<head>
<title>test upload</title>
</head>
<body>
 <FORM 	enctype="multipart/form-data"
action="pls/apex/write_info"
method="POST">
<p>Author's Name:<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>
</body>
</html>
The procedure write_info is as below:
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;
end;
After I create the procedure and the html page in an html region in APEX, I am unable to get it to load the required parameters. What modifications would I need to do, so as to load the file into the table as well.
Presently, when I click the submit button, I get a Page Not Found error.
However, if I put the url as:
http://devserver:7777/pls/apex/write_info?who=Test?description=Test?FILE=c:\test
I am able to see the values being inserted into the table specified in the write_info procedure. However, on submitting the data through the form, I get the Page Not Found error. Is there any other step that needs to be followed or am I making some very obvious mistake? Please do let me know.

Thanks,
Rishi
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 18 2008
Added on Feb 18 2008
6 comments
882 views