Below is a solution where I am going to show you how to upload a file using screen flow.
Use Case: User would like to upload a file while updating a checkbox from the Task Object. Request was to add some validation rules so that the user wouldn’t be able to upload the file unless he ticks on the checkbox.
The challenge: Although Salesforce Visual Flows gives us ability to use OOB File Upload component, there is no mechanism to validate it (Currently we do not have “Required” OR “Validate Input” section for this component which are available for other data types Text, Number, etc ). The workaround is to add a couple of elements (Decision & Assignments) which seems to work for this use case.
Outcome: Please see the working demo of the Flow below
Solution: How to build the Screen flow