Hi there,

I'm building a form containing a file upload field with the FormFu 
Catalyst controller.

Now I need to check the file size so I can keep users from uploading 
zero-sized files.
I tried to build a custom constraint or validator to check for that, but 
can't see a way provided to access the file or its attributes (usually 
in Catalyst via $c->req->upload('fieldname') within a constrain() or 
validate() method.


Any ideas how to workaround this? How can I trigger an error for the 
upload field in the Catalyst controller (which wouldn't very very 
elegant though)?


Shouldn't basic checking of uploaded Files be realizeable in a Validator 
or Constraint, e.g. type checking, virus checking, etc? That could offer 
a great code reusability...


cheers, Hoeni

_______________________________________________
HTML-FormFu mailing list
[email protected]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to