[Catalyst] upload->fullpath

David Rio Deiros drio at console.net
Sat Apr 1 20:51:19 CEST 2006

Hi there,

Some weeks ago we were talking about modifing upload->filename to 
return only the name of the file and then to have another method
(maybe called fullpath) which will return the fullpath of the

I have started digging into the code and this is what I would do:

1. Remove the accessor for filename in Catalyst::Request::Upload

2. Add a new method which will parse the upload string. Somthing

    if ( $original_filename =~ /([^\/\\]+)$/ ) {
        return $1;
    else {
        return $original_filename;

3. Add a new method which basically return the original 
upload string name.

I have tried this but I run into a deep recursion when I run
the filename method since there is already an attribute with
that name. 

Do you guys thing this is the proper way to do it? Advices are



More information about the Catalyst mailing list