FilePicker
Attaches a photo or a PDF to a file field and uploads it.
Use it for: Adding a file to a record, inside a Form. It offers only the kinds the bound field accepts: the photo library, the camera with camera, Files for a PDF, and the document camera with scanDocument, which makes a PDF of up to 20 pages. It saves into Ynch-hosted storage when the field stores "ynch", or into the app’s private Supabase bucket.
- CategoryInput
- ChildrenNone
- DataOne field (bindings.value)
- ActionNone
| Prop | Required | Accepts | What it does |
|---|---|---|---|
label |
Yes | text, up to 200 characters | The visible label, also read by VoiceOver. |
required |
No | true or false |
The form cannot be saved while this is empty. |
disabled |
No | true or false |
Show it greyed out and ignore taps. |
camera |
No | true or false |
Also offer Take Photo, on iPhones that have a camera. |
scanDocument |
No | true or false |
Also offer the document camera, which photographs paper pages into one PDF. The field must accept pdf. |
Every component also accepts id (required, unique on its screen), and the optional preset and style described in Style options. Every component except Screen accepts when, described in Data-driven look.
Example
Section titled “Example”From the Field Inspection example project:
{ "id": "photo", "type": "FilePicker", "props": { "label": "Photo", "camera": true }, "bindings": { "value": { "model": "inspection", "field": "photo" } }}