How to set document before save in lightning component salesforce

In this post, we cover the second approach, using Visualforce to upload files and attach them to a Salesforce record.

Requirements

The Lightning component we will develop:

Video demo

To see a demo of the completed file uploader component in action, check out this video:

Implementation details

Now that we’ve established the requirements, let’s dive into the code. All the source code is available in GitHub.