I tried to load file with long filename until that file was loaded. So 
maximal length for filename is 34 symbols.

I do like that:
last_symbol = len(document[key].filename) - 1
while document[key].filename[last_symbol] != '.':
    last_symbol -= 1
without_ext = document[key].filename[:last_symbol]
if len(without_ext) < 35:
    load = db_app.doc_images.validate_and_insert(person=f'{f} {i} {number} 
{email}',
                                                 doctype=document.doctype, 
file=document[key])
else:
    # return message about filename < 35 sybols.


-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/a1ab20f7-1df7-4949-9232-13bbbb931a2bo%40googlegroups.com.

Reply via email to