File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
flask_parameter_validation/parameter_types Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ All parameters can have default values, and automatic validation.
90
90
91
91
These validators are passed into the classes in the route function, such as:
92
92
* ` username: str = Json("defaultusername", min_length=5) `
93
- * ` profile_picture: Any = File(content_types=["image/png", "image/jpeg"]) `
93
+ * ` profile_picture: werkzeug.datastructures.FileStorage = File(content_types=["image/png", "image/jpeg"]) `
94
94
* ` filter: str = Query() `
95
95
96
96
### Overwriting default errors
Original file line number Diff line number Diff line change @@ -16,8 +16,10 @@ def __init__(
16
16
min_length = None , # Minimum file content-length
17
17
max_length = None # Maximum file content-length
18
18
):
19
- super ().__init__ (default , min_length = min_length , max_length = max_length )
20
- self .content_types = content_types # Array of content type strs
19
+ super ().__init__ (default )
20
+ self .content_types = content_types
21
+ self .min_length = min_length
22
+ self .max_length = max_length
21
23
22
24
def validate (self , value ):
23
25
# Content type validation
You can’t perform that action at this time.
0 commit comments