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
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
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
3 matches
Mail list logo