By the way, here's the working script segment...hope this helps someone:

<%
if($Request->ServerVariables('HTTP_METHOD')->item eq 'POST') {
    $fu = $Server->CreateObject("AspUtil.FileUpload");
    $fu->{'directory'} = $Server->MapPath('.');
    my $rc = $fu->Upload;
    if ($rc == 0) {
        my $n;
        for ($n = 0; $n <= ($fu->count-1); $n++) {
            my $item = $fu->item($n);
            $Response->write("Filename:  " . $item->filename . "<br>\n");
            $Response->write("Length:  " . $item->size . "<br>\n");
            $item->Save;
        }
    }
    else {
        $Response->write("File upload failed  RC: " . $rc . "<br>\n");
    }
}
else {
%>
...
<form method=post ENCTYPE="multipart/form-data" action="upload.asp">
...
<%
}
%>


----- Original Message -----
From: "Josh Reynolds" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 11, 2001 9:02 AM
Subject: Re: ASP File Upload


> Thanks a lot, that fixed the problem.  I'm pretty new with Perl,
appreciate
> the help very much.  I apparently didn't realize how OLE objects are
created
> and stored.  I always wondered why I would see OLEHASH00088x0839{id} and
> crap like that when I left off the ->item at the end of a
> $Request->querystring('whatever') expression :)  Data::Dumper is *great*
>
> thanx,
> josh
>
>
> ----- Original Message -----
> From: "Ron Grabowski" <[EMAIL PROTECTED]>
> To: "Josh Reynolds" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Tuesday, April 10, 2001 8:36 PM
> Subject: Re: ASP File Upload
>
>
> > >     fu.directory = Server.MapPath("./attach")
> >
> > .directory looks like a property
> >
> > >      $fu->directory = $Server->MapPath(".");
> >
> > $fu->{directory} = $Server->MapPath(".");
> >
> > See what Data::Dumper has to say:
> >
> > use Data::Dumper
> > $Response->Write('<PRE>'.Dumper($fu).'</PRE>');
> > _______________________________________________
> > Perl-Win32-Web mailing list
> > [EMAIL PROTECTED]
> > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web
>
> _______________________________________________
> Perl-Win32-Web mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to