[web2py] Re: how to limit upload field

2011-08-03 Thread annet
Hi António, In my database model I have a field of type upload on which I set the following validators: db.logofile.file.requires=[IS_IMAGE(extensions=('gif','jpg','jpeg','png'),maxsize=(348,108)),IS_LENGTH(36*1024,error_message='file size exceeds 36 KB')] The IS_LENGTH(...) limits the file

[web2py] Re: how to limit upload field

2011-08-03 Thread David Marko
Do I understand correctly, that validator allows uploading e.g. 10GB file, than checks the file size and when exceedes the limit, deletes the file ... so at least for the moment file takes its disk space? So potentialy someone can upload 100GB file and fill my disk? David