For more information... RTFM!
NAVIGATION
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

upload

If the filter argument refers to a CGI variable, containing an uploaded file, then return the file content encoded into the CGI variable.  Otherwise return the default value, supplied in the tag's body text.

See the [value-extended] tag.

Example

[filter upload.filename]Default value[/filter]

Results in:

Default value

Source code

sub {
    my ($fn, $vn) = @_;

    if (tag_value_extended($vn, { test => 'isfile', })) {
        return tag_value_extended($vn, { file_contents => 1 });
    }
    else {
        return $fn;
    }
}

Category:  Filters
Last modified by: Kevin Walsh
Modification date: Friday 23 February 2007 at 11:49 AM (EST)
Home  |  Legal nonsense  |  Privacy policy  |  Contact us