(Sorry, my previous reply went only to Alberto and not to mason- 
users.  Could somebody configure the list to add a Reply-To header?)

Alberto,

Now that you have changed the if-clause to check $ok, you no longer need
   <input type="hidden" name="fitxer" value="1">
in the form.

I believe that for file uploads, you need MasonArgsMethod to be  
mod_perl, not CGI.

Anyway, I tried your new code on my server, and it works for me.

Derek


On 29 Jun 2006, at 00:37 , Alberto Mateos wrote:

> Hi Derek,
>
> I have done what you comment to me but follows without working.
> The lines of code that I have executed are:
>
> <%args>
>       $fitxer => undef
>       $ok => undef
> </%args>
>
>     <% $content %>
>     <form METHOD="POST" ENCTYPE="multipart/form-data">
>     <input type="file" name="fitxer">
>     <input type="submit" name="ok" value="show">
>     <input type="hidden" name="fitxer" value="1">
>     </form>
>
> <%init>
>   my $content = '';
>   if($ok){
>     use Apache2::Upload;
>
>     my $req = Apache2::Request->new($r);
>     my $upload = $req->upload("fitxer");
>     my $size = $upload->size;
>
>     $upload->slurp($content);
>   }
> </%init>
>
>
> The error is the same one. What I make bad?
>
> Thanks a lot.


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to