Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Upload Problem on OAS
Oracle Ver: 8.1.6
OAS Ver: 4.0.8.6
OS Ver: Win NT 4.0
I am trying to upload a file to the server using the PL/SQL Toolkit. The toolkit is installed. I followed the directions in the PL/SQL Toolkit PDF documentation. What is supposed to happen is that the file is uploaded and the filename is passed as a paramater of the procedure. What is happening is that the contents of the uploaded file are being placed in the parameter that is supposed to be the filename. Below are the form, procedure and results.
-----------------------------------html form------------------------------
<html>
<head>
<title>
File Uploader
</title>
</head>
<body bgcolor="#F5F5DC" >
<center><h3>File Uploader</h3></center>
<form enctype="multipart/form-data" action="/prv/save_file" method="POST">
<input type="hidden" name="filedoc" value="0"></input>
<input type="hidden" name="usrt" value="I"></input>
<center><table border="1">
<tr>
<td align="left"><b>Label: </b></td> <td align="left"><input name="filename" type="text" size="30"></input></td>
</tr>
<tr>
<td align="left"><b>Attachment to upload: </b></td> <td align="left"><input name="myfile" type="file" size="30"></input></td>
</tr>
<tr>
<td align="center" colspan="2"> <input type="Submit" value="Upload Attachment"></input><inputtype="button" value="Close" onclick="window.close();"></input></td>
</tr>
</table></center>
</form>
</body>
</html>
---------------------------------------procedure----------------------- PROCEDURE save_file(filedoc IN INTEGER, usrt IN VARCHAR2 := 'escrow1', filename IN varchar2, myfile IN varchar2) AS docLob clob; lobLength number := 255; lobOffset number := 1; textBuffer VARCHAR2(255); loblen number; thecount number; BEGIN wl('Stand alone procedure<br>'); wl(filedoc || '<br>');
--------------------------------------results of uploading a file c:\me.jpg and Label = test------------------
Stand alone procedure<br>
0<br>
I<br>
test<br>
ÿØÿà
Received on Mon Apr 08 2002 - 14:12:45 CDT
![]() |
![]() |