Merge pull request #832 from ismailbaskin/vich-compat

Allow sending empty file data
This commit is contained in:
William Durand 2016-05-11 17:16:17 +02:00
commit 9dfd984c68

View File

@ -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();
}