Thanks, guys. On Saturday, June 29, 2013 10:35:38 PM UTC+2, Niphlod wrote: > > extension on the IS_UPLOAD_FILENAME takes either a string (i.e. a single > extension) or a regex, so you can play with it. I've no time to test it, > but probably doc|pdf|odt will work ok. > > On Saturday, June 29, 2013 8:45:10 PM UTC+2, lesssugar wrote: >> >> Really, no one? :] Could IS_MATCH help with checking the uploaded file >> extension? >> >> On Saturday, June 29, 2013 1:01:29 AM UTC+2, lesssugar wrote: >>> >>> I need to validate extension of documents being uploaded in my app: doc, >>> pdf, odt, ... . >>> >>> Image upload has its IS_IMAGE validator, which takes "extensions" >>> argument, so list of accepted extensions can be provided. >>> >>> The only validator I see for non-image uploads is IS_UPLOAD_FILENAME, >>> which takes "extension" argument, so only one extension can be provided. >>> How come? I tried (for a test) to use tuple or list as the argument value, >>> but I get such error: >>> >>> *'tuple' object has no attribute 'match'* >>> * >>> * >>> Is there another way to validate my upload field? Or maybe I'm doing it >>> wrong? >>> >>
-- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

