Skip to content

Commit dc005ec

Browse files
committed
Fix bytes rendered wrong
1 parent 6b7c7cb commit dc005ec

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/python-fastui/fastui/json_schema.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def special_string_field(
214214
schema: JsonSchemaConcrete, name: str, title: _t.List[str], required: bool, multiple: bool
215215
) -> _t.Union[FormField, None]:
216216
if schema['type'] == 'string':
217-
if schema.get('format') == 'binary':
217+
if schema.get('format') == 'binary' and schema.get('accept'):
218218
return FormFieldFile(
219219
name=name,
220220
title=title,
@@ -315,6 +315,8 @@ def as_title(s: _t.Any) -> str:
315315
'string-uri': 'url',
316316
'string-uuid': 'text',
317317
'string-password': 'password',
318+
'string-binary': 'text',
319+
'string-base64': 'text',
318320
'number': 'number',
319321
'integer': 'number',
320322
}

0 commit comments

Comments
 (0)