This queue is for tickets about the CGI-Simple CPAN distribution.

Report information
The Basics
Id:
6114
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
MARKSTOS [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.411 (Entity 5.404)
Subject: wish: easy access to list of file upload fields
X-RT-Original-Encoding: iso-8859-1
Content-Length: 1023
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.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.