Skip to content

Commit 7df5721

Browse files
committed
docs: update docs
1 parent c015a82 commit 7df5721

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

docs/file_uploads.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,18 @@ const ComponentWithForm = (props) => {
4848

4949
return <Form
5050
schema={schema}
51-
formContext={...fileWidgetContext}
51+
formContext={{...otherContext, ...fileWidgetContext}
5252
onSubmit={handleSubmit}
5353
/>
5454

5555
}
5656

5757
```
5858
59+
> [!NOTE]
60+
> The `FileWidget` sets the string value to a serialized JSON string: '{"status": "Clean", "name": "FileName.pdf", "id": 1234}'
61+
> The backend is expected to follow that schema when passing form data
62+
5963
### Backend considerations
6064
6165
- The payload will contain a serialized `{id: <id | undefined>, name: <name>, status: <"unscanned"|"clean"|...>}` object that will be part of the form data. Parsing that form data on the backend can be useful

0 commit comments

Comments
 (0)