The File Uploader component can send and receive events that allow custom Lightning Web Components on your Experience Cloud site to interact with the upload process. These events can be used to pass record information to the uploader, track upload progress, or respond to completed uploads in real time. Schemas for file uploader events:
Events to Send to Uploader Component:
File uploader event
Key
Type
Description
type (required)
String
Type of event. Value should be expconnect:upload
recordId
String
Record id of record to be associated with the uploaded file
targets
List<String>
List of names of the uploader components that should process the upload event
Events to Receive from Uploader Component:
Initialized event
Key
Type
Description
type
String
Type of event. Value should be expconnect:initialized
id
String
Name of the component
isSuccess
Boolean
Whether the component has been successfully initialized or not
errors
String
Error message received is the component has been successfully initialized
Files change event
Key
Type
Description
type
String
Type of event. Value should be expconnect:fileschange
id
String
Name of the component
files
List<Object>
List of files object that are set to be uploaded
Upload result event
Key
Type
Description
type (required)
String
Type of event. Value should be expconnect:uploadresult
id
String
Name of the component
isSuccess
Boolean
Whether the file upload was success or not
error
String
Error message when there is an error
results
Object
Results object that has the file information if it is a successful
results.files
List <Object>
List of files object that are uploaded
Upload progress event
Key
Type
Description
type
String
Type of event. Value should be expconnect:uploadprogress