rduplain/flask-wtf — Issue #2: Add file validators
Author: rduplain
Created: 2012-02-29 16:44:44+00:00
State: open
Labels: enhancement, import

Add a set of file upload validators to use with a FileField. These might be added in a separate subpackage. Validators could include:

* is_file : check if field has a "file" attribute

* allow_types/deny_types : allow/deny certain content types, e.g. "image/jpeg", "text/html" etc.

* allow_filenames/deny_filenames : allow/deny certain filename patterns, e.g. ".jpg", ".txt" etc.

* is_image : checks that content type and filename match valid image (JPEG, GIF, TIFF, PNG).

* is_audio: checks that content type and filename match valid audio file (WAV, OGG etc)

---------------------------------------
- Bitbucket: https://bitbucket.org/danjac/flask-wtf/issue/2
- Originally Reported By: [Dan Jacob](http://bitbucket.org/danjac)
- Originally Created At: 2010-07-16 11:06:55