I'm using IS_LENGTH in my model to validate file size of uploaded image: IS_LENGTH(2097152, 1, error_message='Max image size: 2MB')
However, the size is being checked after the file's been uploaded, which is not very user friendly when it comes to files larger than 2MB. How can I validate the file size and then - if it's lower than 2MB - proceed with upload? Can it be done with Python or do I need JS for this? -- 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/groups/opt_out.

