implementing-ui-bundle-file-upload

Upload files from React UI bundles to Salesforce with progress tracking.

803|289|Updated Nov 7, 2025
One-click install
npx skills add https://github.com/forcedotcom/sf-skills --skill implementing-ui-bundle-file-upload-forcedotcom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: implementing-ui-bundle-file-upload
Source: https://github.com/forcedotcom/sf-skills/tree/main/skills/implementing-ui-bundle-file-upload
Command: npx skills add https://github.com/forcedotcom/sf-skills --skill implementing-ui-bundle-file-upload-forcedotcom

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Implementing reliable file upload UX in an Aura/React UI bundle without hand-rolling fragile client-side upload logic, while ensuring files land in Salesforce Content and can be linked to records.

Core Features & Use Cases

  • Progress-tracked upload API: Use the package’s upload() function with an onProgress callback to surface pending, uploading, processing, success, and error states.
  • Three upload/link patterns: Upload without linking, upload and link immediately via recordId, or upload first and link later after the record is created.
  • Salesforce ContentVersion integration: Always get contentBodyId back, and optionally create ContentVersion via recordId (or by manually creating ContentVersion later for deferred linking).
  • API-only workflow: Build your own UI components (file input and/or drag-and-drop) around the exported APIs.

Quick Start

Tell your agent: implement a custom React UI bundle file uploader using the upload() API with per-file progress UI, returning contentBodyId and optionally creating ContentVersion when recordId is provided.

Frequently Asked Questions about implementing-ui-bundle-file-upload

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upload files to Salesforce from a React UI bundle with progress tracking?

To upload files to Salesforce from a React UI bundle with progress tracking, use the provided upload() API with an onProgress callback to surface pending, uploading, processing, success, and error states directly in your UI.

How do I link an uploaded file to a specific Salesforce record?

You can upload files and link them to Salesforce records immediately by passing a recordId to the upload() API. The API returns a contentBodyId and optionally creates the ContentVersion record for direct linking during the upload process.

Can I upload files to Salesforce Content and link them to a record later?

Yes, you can upload files to Salesforce Content and defer record linking. Use the upload() API without a recordId to get a contentBodyId, then manually create the ContentVersion and link it to the record after record creation is complete.

Do I need to use predefined UI components to implement Salesforce file uploads?

No, the upload() API is completely API-only and workflow-agnostic. You build your own custom React UI components, such as file inputs or drag-and-drop zones, around the exported upload functions without forced UI constraints.

Does the Salesforce file upload API support uploads to the current user profile?

Yes, the Salesforce file upload API supports uploads targeted to the current user profile. It handles three distinct patterns: direct-to-record uploads, deferred record linking, and current user profile targeting using the upload() function.

What does the Salesforce file upload API return for ContentVersion integration?

The upload() API returns a contentBodyId which must be integrated with ContentVersion creation. You can optionally create the ContentVersion via recordId during the upload, or manually create it later for deferred record linking.