From 3c082823c8ede656cfd8b4123d4cb1257b6b4ed2 Mon Sep 17 00:00:00 2001 From: greenwood712 Date: Tue, 21 Apr 2020 11:07:45 +0800 Subject: [PATCH] Fix missing enctype for MultipleFileField Fix for https://github.com/mbr/flask-bootstrap/issues/198 --- flask_bootstrap/templates/bootstrap/form.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask_bootstrap/templates/bootstrap/form.html b/flask_bootstrap/templates/bootstrap/form.html index 61814b5..d0c1a6d 100644 --- a/flask_bootstrap/templates/bootstrap/form.html +++ b/flask_bootstrap/templates/bootstrap/form.html @@ -215,7 +215,7 @@ {%- set _enctype = [] %} {%- if enctype is none -%} {%- for field in form %} - {%- if field.type == 'FileField' %} + {%- if field.type in ['FileField', 'MultipleFileField'] %} {#- for loops come with a fairly watertight scope, so this list-hack is used to be able to set values outside of it #} {%- set _ = _enctype.append('multipart/form-data') -%}