db.table.feild.requires = IS_IMAGE() or db.table.field.requieres = IS_EMPTY_OR(IS_IMAGE()) if you want it to be empty at times too. BR, Jason
On Wed, Jun 5, 2013 at 2:53 PM, sasogeek <sasog...@yahoo.com> wrote: > in the db.py model, when I create a table and I want users to be able to > upload files, how do I make sure that the 'upload' parameter allows only > image uploads? > > -- > > --- > 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 web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- --- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.