[Catalyst] Getting the file upload fields

Octavian Râşniţă orasnita at gmail.com
Wed Dec 30 11:32:49 GMT 2009


Hi,

I have seen that after a form that contains a file upload field is 
submitted, I can't access the name of that field if it was sent empty (no 
file was submitted).

I have tried to override more Catalyst methods like prepare_body_parameters, 
prepare_uploads, finalize_uploads, and even finalize_body and in each of 
them I tried to get the list of parameters using $c->req->params and 
$c->req->uploads.

I've seen that the field is submitted to the server even if it is empty and 
it looks like:

Content-Disposition: form-data; name="file"; filename=""
Content-Type: application/octet-stream

In the application I need to know which are the file upload fields that were 
sent, even if they are empty.

Does anyone know how I can find this?

Thank you.

Octavian




More information about the Catalyst mailing list