Subject: | wish: easy access to list of file upload fields |
Hello,
Thanks for CGI::Simple. I'm glad to have this light-weight CGI.pm
alternative. I'm working on adding support for it to CGI::Uploader,
which should have a stable release soon.
I've noticed there is not easy way to get at the list of all the names
of the file upload fields. This would be nice feature to have for easier
automated form processing.
Right now I see there is way to get a list of /file names/ of uploaded
files, but not the fields they were uploaded through. Here's how I
worked around it:
my @list_of_files = $q->upload;
my @all_field_names = $q->param();
for my $field (@all_field_names) {
my $potential_file_name = $q->param($field);
push @file_field_names, $field , if grep
{m/^$potential_file_name/} @list_of_files;
}
However, looking at the current interface, it's not clear to me how this
could be cleanly added on. Apache::Upload has a nice a way to handle
this, but that interface is rather different than what has begun here.