The UploadButton component creates a button that opens a file upload dialog when clicked.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/gradio-app/gradio/llms.txt
Use this file to discover all available pages before exploring further.
Basic usage
Constructor
Button label text
Upload mode:
"single"- One file"multiple"- Multiple files"directory"- All files in directory
Allowed file types (e.g.,
[".pdf"], ["image"], ["audio"])Return format:
"filepath"- String path to file"binary"- Bytes object
Button style variant
Button size
Events
- click - Triggered when button is clicked
- upload - Triggered when file upload completes