Il 18/01/16 02:36, Ron Chatterjee ha scritto:
> Thank you Massimo,
>
> It seems that will only work with string. But for an example of file
> upload validator, this wouldn't work. Or if I have a DAL validator
> like is URL(). In other words... Let's say I want someone to create a
> profile of his work by adding multiple url links to their portfolio
> using a same table. Or add couple of primary emails as a validator
> IS_EMAIL(). It wouldn't. 
>
>
> db.define_table('news',
>                       Field('title', notnull=True),
>                       Field('link','list:string', requires=IS_URL()),
> #This is wrong
>                       Field('body', 'text'),
>                       Field('files','list:string','upload'), #This is
> wrong
I think that for a solution to the need of multiple file upload you have
to think of a one to many relation with a table in wich to save your
attachments.
Mind that in this case records in attachment table have to be created
only after your record exist in the "news" table.

Cheers

    Manuele

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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/d/optout.

Reply via email to