Re: [web2py] how to make 'upload' only allow images

2013-06-05 Thread Jason (spot) Brower
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 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

Re: [web2py] how to make 'upload' only allow images

2013-06-05 Thread Jason (spot) Brower
Not that this only checks the extension but not the data itself. On Wed, Jun 5, 2013 at 2:57 PM, Jason (spot) Brower wrote: > 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, J

[web2py] how to make 'upload' only allow images

2013-06-05 Thread sasogeek
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 gro