I need to get the form field name from a form upload. 

I've been using the upload object and looping through
my uploads:

foreach my $upload ($r->upload) {
    # do stuff
}

The first form has 10 fields (labeled
upload1-upload10). For a quick hack I simply used a
counter and all was good:

my $upload_id = 0;
foreach my $upload ($r->upload) {
    $upload_id++;
    # do stuff
}

However, the next page will display the results of the
upload...all the good images uploaded, and a bad image
icon for the ones that didn't meet the upload criteria
(size, type, etc). The images maintain their original
order.

At this point the user is allowed to reupload new
images to replace the bad images (the is an upload
button on for each bad image, not for good images).

Now my counter fails, as if the user tries to replace
upload3 (and that's the only one that is bad), my
counter thinks it's upload1 and replaces the wrong
image.

Is there a way to get the field name...I didn't see
this in the cookbook or the archives...

Thanks. 

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

Reply via email to