in reply to Re: Extract and Pass File Upload Value
in thread Extract and Pass File Upload Value

I downloaded FileUpload-Filename-0.01 and read the MAN and came to the conclusion that I may not be able to utilize it. However, your advise did lead me to a perl module on CPAN named HTML Validation. With the prior, there are numerous pms required to download eg. Browser Detect... etc, however with the latter there are none.

I tested the pm at http://www.htmlhelp.org/tools/validator/upload.html.en and it does just what I need it to do without the additional pms - returning the results to an assigned page.

I already have a system in place where each users data is stored in ./shared.template in their individual directories. When a user fills out a particular form, that form along with the users input is copied to thier directory.

I need a solution to write the file input value to "whatever.template" after the form is submitted, such as the above url example.

I have downloaded and reviewed the source code for HTML:Validator, yet have not found a way to neither integrate it with my template.pm (primary code already submitted) nor extract filename as a stand-alone pm.

If needed I can private message the url to my project.

Thanks
  • Comment on Re^2: Extract and Pass File Upload Value

Replies are listed 'Best First'.
Re^3: Extract and Pass File Upload Value
by fmerges (Chaplain) on May 01, 2006 at 11:27 UTC

    Hi,

    I don't understand what you wanna do. Could you explain in a high level what you want to do?

    Regards,

    fmerges at irc.freenode.net
      All I'm really trying to do is capture the name/value pair from the file upload field:

      my $key = ''; foreach $key (keys %$p_upload_files) { my $p_hash = $$p_upload_files{$key}; next unless (($p_hash) and (defined($$p_hash{'server file name'})) +); $FORM{$key . "_filename"} = $$p_hash{'server file name'};

      and merge/save it with the name/value pairs here.
      my %replace = (); $text = ''; my ($name, $value) = (); while (($name, $value) = each %FORM) { $replace{$name} = $value; next if ($name =~ m!^(shared|genesis_system)_!); # separate name-s +paces next if (($name eq 'Action') or ($name eq 'Template') or ($name eq + 'CWD') or ($name eq 'web_auth_cp')); # reversed names $text .= &ue($name) . '=' . &ue($value) . "\n"; } &_load_system_values( \%replace, $FORM{'Template'} ); # save the name-value pairs that are specific to this template: <br> my $datafile = ".$FORM{'Template'}"; $datafile =~ s!/!.!g; $err = &WriteFile( $datafile, $text); next Err if ($err);