Path: news.easynews.com!easynews!peer1-sjc1.usenetserver.com!usenetserver.com!cyclone.bc.net!newsfeed.stanford.edu!postnews1.google.com!not-for-mail
From: dan_kefford@hotmail.com (Dan Kefford)
Newsgroups: comp.databases.oracle.server
Subject: Uploading files using the PL/SQL cartridge
Date: 24 Apr 2002 11:27:00 -0700
Organization: http://groups.google.com/
Lines: 69
Message-ID: <13f8fcb0.0204241027.4c03a8ec@posting.google.com>
NNTP-Posting-Host: 130.132.157.60
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1019672820 8272 127.0.0.1 (24 Apr 2002 18:27:00 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: 24 Apr 2002 18:27:00 GMT
Xref: easynews comp.databases.oracle.server:144409
X-Received-Date: Wed, 24 Apr 2002 11:24:39 MST (news.easynews.com)

Greetings all...

I am not able to upload files into the database based on part of the
example given in the MetaLink site, note #77573.1.

Here are the versions of software being used:

Oracle8i EE 8.1.6.3
OAS 4.0.8.2.3
AIX 4.3.3 


Here is the my source:

CREATE OR REPLACE PACKAGE websys.foobar IS
  PROCEDURE upload_form ;
  PROCEDURE upload_data(file_name IN VARCHAR2) ;
END foobar ;
/

CREATE OR REPLACE PACKAGE BODY websys.foobar AS
   PROCEDURE upload_form IS
   BEGIN
      htp.hr;
      htp.header(1, 'File Uploading');
      htp.hr;
      htp.formopen(CURL=>'foobar.upload_data',
                   CMETHOD=>'POST',
                   CENCTYPE=>'multipart/form-data');
      htp.tableopen(CBORDER=>'0');
      htp.tablerowopen;
      htp.tabledata('File:');
      htp.tabledata('<INPUT TYPE="FILE" NAME="file_name">');
      htp.tablerowclose;
      htp.tablerowopen;
      htp.tabledata(htf.formsubmit);
      htp.tabledata(htf.formreset);
      htp.tablerowclose;
      htp.tableclose;
      htp.formclose;
   END upload_form ;

   PROCEDURE upload_data(file_name IN VARCHAR2) IS
   BEGIN
      htp.htmlopen;
      htp.headopen;
      htp.title('File Uploaded');
      htp.headclose;
      htp.bodyopen;
      htp.header(1, 'Upload Status');
      htp.print('Uploaded successfully');
      htp.bodyclose;
      htp.htmlclose;
    END upload_data ;
END foobar;

I created these objects under WEBSYS, created a public synonym, and
made sure our DAD user has execute on the package.

When I attempt to upload a file into the database, the result is
simply the 'Uploaded successfully' message, but no record in
WEBSYS.OWS_CONTENT.

Am I missing something? I thought this was going to be a no-brainer
but this has been frustrating me for a full day now.

Thanks in advance,

dan
