Hi all,
Background:
I have created a file upload form where you can upload any file smaller than 1MB.
This is the db field for the file:
Field('file1', 'upload', requires = IS_LENGTH(minsize=0, maxsize=1048576, error_message='File is too huge.')),
Problem:
When I try to upload a huge file larger than 1MB, Web2py freezes up for up to 2 minutes, before finally returning to the form showing the error_message that 'file is too huge'. I am unable to access any other part of my application when web2py freezes.
Question:
Is there any way to work around this problem? For example, is there anyway to check the size of file before uploading it?