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: How to upload a file using Web and PL/SQL?

Re: How to upload a file using Web and PL/SQL?

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 16 Jul 1998 02:11:58 GMT
Message-ID: <35ae6106.1478305@192.86.155.100>


A copy of this was sent to "David D. Anderson" <David.D.Anderson_at_wrtfac.day.cdc.com>
(if that email address didn't require changing) On Wed, 15 Jul 1998 17:06:12 -0400, you wrote:

>All,
>
>I'm trying to find sample PL/SQL code to allow me to store a file
>uploade from the browser using an HTML form input tag of type file
>(<INPUT TYPE=FILE NAME=UPFILE>).
>
>All the Oracle Web Application Server 3.0 books that I have mention that
>this is possible, but don't give any examples.
>

Until OAS4.x, you have to use a 'replacement cartridge' of sorts. It works like the pl/sql cartridge but handles file uploads (and some other things). You can get the source code from http://govt.us.oracle.com/ under downloadable utilities.

OAS4.x will support uploading with the pl/sql cartridge.

>When I submit my html form, I get the name of the file back from my
>PL/SQL script instead of the actual file content, unless I use the
>multipart/form-data encoding type and then I get an error...
>
>Here is what the HTML looks like.
><HTML>
><BODY>
><form method=post action="http://hostname.com:8999/dtprracc/plsql/adm
>in.createIssuePage" enctype="multipart/form-data">
>File:</td><td><input name="p_issue_page" type="file" size=64 maxl
>ength=128 align=left>
><input type="SUBMIT" value="Submit" align=left>
></form>
></BODY>
></HTML>
>
>
>It seems like a get an error automatically when I use th e
>multipart/form-data encoding. Do I need to do anything special to
>accept this type of encoding from PL/SQL?
>
>I just want the content of my uploaded file to end up in a varchar2
>variable that I will later store in the database...
>
>Any help would be appreciated.
>
>Sincerely,
>Dave Anderson.
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Wed Jul 15 1998 - 21:11:58 CDT

Original text of this message

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