startswith on upload field?

17 views
Skip to first unread message

Marin Pranjić

unread,
Sep 18, 2013, 10:54:36 AM9/18/13
to web2py-d...@googlegroups.com
Is there any valid reason why it's not possible to use startswith on upload field?

        if not self.type in ('string', 'text', 'json'):
           
raise SyntaxError("startswith used with incompatible field type")


the same question is for endswith.
It seems to work if I just add 'upload' to the list. Any gotchas about it?

To me it makes more sense to use it on filename then on json object.

Marin

Massimo DiPierro

unread,
Sep 18, 2013, 11:04:48 AM9/18/13
to web2py-d...@googlegroups.com
No. this can be fixed.

--
-- mail from:GoogleGroups "web2py-developers" mailing list
make speech: web2py-d...@googlegroups.com
unsubscribe: web2py-develop...@googlegroups.com
details : http://groups.google.com/group/web2py-developers
the project: http://code.google.com/p/web2py/
official : http://www.web2py.com/
---
You received this message because you are subscribed to the Google Groups "web2py-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py-develop...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages