From 6758e2c2dec15cad68f007f271434d30843d29da Mon Sep 17 00:00:00 2001 From: Anurag Pandey Date: Mon, 6 Jan 2020 23:12:38 +0530 Subject: [PATCH] fix issue #198 Setting enctype="multipart/form-data" for MultipleFileField --- flask_bootstrap/templates/bootstrap/wtf.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask_bootstrap/templates/bootstrap/wtf.html b/flask_bootstrap/templates/bootstrap/wtf.html index cfc45be9..47d22453 100644 --- a/flask_bootstrap/templates/bootstrap/wtf.html +++ b/flask_bootstrap/templates/bootstrap/wtf.html @@ -175,7 +175,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') -%}