Skip to main content
This guide shows you how to handle image uploads in Joyfill forms.

How It Works

When a user uploads an image, the onUpload callback is triggered. You need to:
  1. Handle file selection (file picker or camera)
  2. Process the files (validate, resize, etc.)
  3. Upload to your server
  4. Return the uploaded file URLs

Basic Example

Using the Event Data

The onUpload callback receives information about the upload request:

Async Uploads

For uploads that take time, use suspend functions:
Note: The onUpload callback only handles the Joyfill integration. You’re responsible for implementing file selection, processing, and server upload according to your app’s needs.