In plain words: The <lightning-file-upload> component is a native Salesforce LWC tool that lets users drag and drop or browse files directly from their computer into Salesforce. It automatically handles chunked file uploads, converts files into ContentVersion / ContentDocument records, and links them directly to the active record ID without requiring custom Apex upload endpoints or hitting the 6 MB synchronous heap size limit. Managing file attachments—such as customer invoices, identification proofs, contracts, and inspection photos—is a standard requirement across Salesforce implementations. Building custom binary file uploaders with Apex controllers often results in heap size exceptions when files exceed 4–5 MB. The standard <lightning-file-upload> component solves this by uploading files directly to Salesforce Files via optimized streaming APIs, supporting large uploads up to 2 GB out of the box.
Topic
LWC
Lightning Web Components