mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-03-10 01:26:09 +03:00
Merge pull request #832 from ismailbaskin/vich-compat
Allow sending empty file data
This commit is contained in:
commit
9dfd984c68
@ -443,6 +443,9 @@
|
|||||||
key = $('.key', $(this)).val();
|
key = $('.key', $(this)).val();
|
||||||
if ($('.value', $(this)).attr('type') === 'file' ) {
|
if ($('.value', $(this)).attr('type') === 'file' ) {
|
||||||
value = $('.value', $(this)).prop('files')[0];
|
value = $('.value', $(this)).prop('files')[0];
|
||||||
|
if(!value) {
|
||||||
|
value = new File([], '');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
value = $('.value', $(this)).val();
|
value = $('.value', $(this)).val();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user