From 6b1e309a348d52a423dc2257403cb0fa9d865f3b Mon Sep 17 00:00:00 2001 From: Vishnu Satheesan Date: Mon, 23 Nov 2020 10:17:20 +0530 Subject: [PATCH] Update brutusin-json-forms.js --- dist/js/brutusin-json-forms.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dist/js/brutusin-json-forms.js b/dist/js/brutusin-json-forms.js index 155ddbc..463921d 100644 --- a/dist/js/brutusin-json-forms.js +++ b/dist/js/brutusin-json-forms.js @@ -848,7 +848,7 @@ if (typeof brutusin === "undefined") { return clone; } else if (object === "") { return null; - } else if (object instanceof Object) { + } else if (object instanceof Object && !(object instanceof File)) { var clone = new Object(); var nonEmpty = false; for (var prop in object) { @@ -1251,6 +1251,16 @@ if (typeof brutusin === "undefined") { } function getValue(schema, input) { + if(schema.$id === "$.Document") { + input.type = 'file'; + input.getValue = function(){ + if(input.value && input.files.length ){ + return input.files[0]; + } else { + return null; + } + }; + } if (typeof input.getValue === "function") { return input.getValue(); }