From 246babf2098d345bb066100f8613a45f88eb4bfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=CC=87smail=20BASKIN?= Date: Fri, 8 Apr 2016 15:26:31 +0300 Subject: [PATCH] Allow sending empty file data --- Resources/views/layout.html.twig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Resources/views/layout.html.twig b/Resources/views/layout.html.twig index c9fa629..30f280d 100644 --- a/Resources/views/layout.html.twig +++ b/Resources/views/layout.html.twig @@ -443,6 +443,9 @@ key = $('.key', $(this)).val(); if ($('.value', $(this)).attr('type') === 'file' ) { value = $('.value', $(this)).prop('files')[0]; + if(!value) { + value = new File([], ''); + } } else { value = $('.value', $(this)).val(); }