On Wednesday, August 6, 2014 3:09:48 AM UTC-7, Leonel Câmara wrote: > > requires = IS_UPLOAD_FILENAME(extension='pdf') > > That would cover the common case where the extension and the filetype agree, but to be sure that it is a valid PDF file probably requires a tool that reads PDF format and verifies that it is valid. There should be plenty of third-party tools that could be called, but that may be a lengthy process that you'd want to hand off to the scheduler. If you're going to do that, then maybe you should add a field 'validated: boolean' to your table, set it to false in your upload controller and only set it to true when the tool has passed its check You would then use that field as a filter to make the file hidden if not validated, and clean out the entries that don't get validated within 24 hours (or even 1 hour).
/dps -- 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.

