There a IS_IMAGE that can check for BMP, GIF, JPEG, and PNG.
You can copy and modify it to check for other formats.
What formats are you thinking about?

On Nov 22, 9:41 pm, Thadeus Burgess <thade...@thadeusb.com> wrote:
> Is there a way, through SQLFORM to open a file, and make sure it is the kind
> of file you are expecting.
>
> I would like to check to see if the files users are uploading, are indeed
> w2p tarred files with only .py files with a naming scheme in them.
>
> I know I could use SQLFORM.factory and then open the file after it is saved
> to the server, then delete it if it was no good, I was just wondering if
> there was a way to "hook" into the validation.
>
> -Thadeus
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to