Loading
Salesforce now sends email only from verified domains. Read More
Automate Your Business Processes
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          File Upload Screen Input Component

          File Upload Screen Input Component

          Let users upload files from a flow screen.

          Required Editions

          View supported editions.
          A File Upload component, where the flow user has uploaded two files at once.
          Note
          Note This screen component requires Lightning runtime.

          Configure the File Upload Component

          You can select resources from the flow, such as variables or global constants, or you can manually enter a value.

          Attribute Description
          Accepted Formats

          Using the format .ext, enter a comma-separated list of the file extensions that the user can upload.

          This attribute accepts single-value resources. The value is treated as text.

          Allow Multiple Files

          If set to $GlobalConstant.True, the user can upload multiple files.

          This attribute accepts single-value Boolean resources.

          API Name

          The API name of the component.

          An API name can include underscores and alphanumeric characters without spaces. It must begin with a letter and can’t end with an underscore. It also can’t have two consecutive underscores.

          Disabled

          If set to $GlobalConstant.True, the component is disabled.

          This attribute accepts single-value Boolean resources.

          File Upload Label

          Required. Label that appears above the upload button.

          This attribute accepts single-value resources. The value is treated as text.

          Hover Text

          Tooltip that appears when the user hovers over the component.

          This attribute accepts single-value resources. The value is treated as text.

          Related Record ID

          Required. ID of the record to associate the files with. If no value is passed, the component is disabled.

          This attribute accepts single-value resources. The value is treated as text.

          Note
          Note Custom fields added to the ContentVersion object page are rendered in Experience Cloud sites through the contentVersionEditWizard. The contentVersionEditWizard is supported on desktop, but not mobile. Since there’s no screen in mobile to edit or add details to custom fields, file uploads fail when custom fields are marked as required.

          Store the File Upload Component’s Values in the Flow

          All attributes are available to store in flow variables, but usually you must store one of these attributes. The values are assigned to the flow variables when the user navigates to the next screen.

          Attribute Description
          Content Document IDs

          The IDs of the uploaded files.

          You can store this value in a Text collection variable.

          Uploaded File Names

          The names of the uploaded files.

          You can store this value in a Text collection variable.

          Set the Component Visibility

          Specify the logic that determines when the flow displays the component.

          Option Description
          When to Display Component

          Configure when the component is displayed by using conditional logic.

          You can set the components to:

          Always
          Always display the component.
          When all conditions are met (AND)
          Display the component when all of the conditions that you define are met. Define at least one condition.
          When any condition is met (OR)
          Display the component when at least one of the conditions that you define is met. Define at least one condition.
          When custom conditional logic is met
          Display the component when the condition logic that you define is met. Define at least one condition and specify condition logic.

          Validate Input

          Provide a formula that evaluates whether what the user entered is valid and the error message to display if invalid.

          Option Description
          Error Message Specify the error message that appears below the component if the user enters an invalid value.
          Formula

          Provide a formula expression that returns a Boolean value.

          If the formula expression evaluates to true, the input is valid. If the formula expression evaluates to false, the error message appears below the component.

          If the user leaves the field blank and the field isn’t required, the flow doesn’t perform the validation. If the user leaves the field blank and the field is required, the flow shows the default error message and not your custom error message.

          Specify the Behavior of Values on Revisited Screens

          Specify what this component does when a user enters a value, navigates to a previous screen, and then returns to the screen with this component.

          Option Description
          Use values from when the user last visited this screen The component retains the values that the user specified and doesn’t update the values to reflect changes made on previous screens.
          Refresh inputs to incorporate changes elsewhere in the flow

          The component updates the user-specified values to reflect changes made on previous screens.

          If you pause and then resume the flow, the flow retains user-specified values only in Checkbox, Checkbox Group, Currency, Long Text Area, Multi-Select Picklist, Number, Password, Picklist, Radio Buttons, and Text components.

          File Upload Limits

          By default, you can upload up to 10 files simultaneously, unless Salesforce changed that limit. The org limit for the number of files simultaneously uploaded is 25 files with a minimum of one file. The maximum file size you can upload is 2 GB. In Experience Cloud sites, the file size limits and types allowed follow the settings determined by site file moderation.

          Considerations

          • If a user doesn’t upload any files, the value of the Content Document IDs and Uploaded File Names outputs is an empty collection, represented as “[]”. If you check the ISBLANK or ISNULL operator, the value is always false.
          • By default, guest user files are blocked from being uploaded. Admins can change the settings to let guest users upload files. From Setup | Salesforce Files | General Settings, and then select Allow site guest users to upload files. This setting is only valid if the Secure guest user record access setting is enabled in the org.
          • When guest users upload files, the component returns ContentVersionId and not ContentDocumentId.
          • Lightning Out doesn’t support the File Upload component.
          • The file upload component isn’t supported on mobile app or browser when used with flows that are accessed through URLs. This restriction doesn’t apply when the file upload component is used in Lightning App Builder or Experience Builder.
          • If your flow updates the file name after the files are uploaded, and users run your flow while offline, the file names sometimes don't get updated.
          • File Upload Enhanced Screen Input Component (Beta)
            Give users the opportunity to upload files from a flow screen. The File Upload Enhanced (beta) flow screen component is similar to the existing File Upload screen component, but it has some key differences. The File Upload Enhanced (beta) screen component can be used in Aura and Lightning Web Runtime (LWR) sites, instead of just Aura sites. Also, you can require that users upload documents before moving on in the flow.
           
          Loading
          Salesforce Help | Article