Skip to content

Commit dfe76fd

Browse files
authored
Merge pull request #3 from Ezcred-Org/CREDIT-6636
Update brutusin-json-forms.js
2 parents b042996 + 6b1e309 commit dfe76fd

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

dist/js/brutusin-json-forms.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ if (typeof brutusin === "undefined") {
848848
return clone;
849849
} else if (object === "") {
850850
return null;
851-
} else if (object instanceof Object) {
851+
} else if (object instanceof Object && !(object instanceof File)) {
852852
var clone = new Object();
853853
var nonEmpty = false;
854854
for (var prop in object) {
@@ -1251,6 +1251,16 @@ if (typeof brutusin === "undefined") {
12511251
}
12521252

12531253
function getValue(schema, input) {
1254+
if(schema.$id === "$.Document") {
1255+
input.type = 'file';
1256+
input.getValue = function(){
1257+
if(input.value && input.files.length ){
1258+
return input.files[0];
1259+
} else {
1260+
return null;
1261+
}
1262+
};
1263+
}
12541264
if (typeof input.getValue === "function") {
12551265
return input.getValue();
12561266
}

0 commit comments

Comments
 (0)