Off of this question, I attempted to write code to upload a file to the Files tab in lightning exeperience. Here is the code I used from the salesforce guide:
01<!-- Upload a file and put it in your personal documents folder-->
02
03<!-- Page: -->
04 <apex:page standardController="Document" extensions="documentExt">
05 <apex:messages />
06 <apex:form id="theForm">
07 <apex:pageBlock>
08 <apex:pageBlockSection>
09 <apex:inputFile value="{!document.body}" filename="{!document.name}"/>
10 <apex:commandButton value="Save" action="{!save}"/>
11 </apex:pageBlockSection>
12 </apex:pageBlock>
13 </apex:form>
14</apex:page>
15
16 /*** Controller ***/
17 public class documentExt {
18 public documentExt(ApexPages.StandardController controller) {
19 Document d = (Document) controller.getRecord();
20 d.folderid = UserInfo.getUserId(); //this puts it in My Personal Documents
21 }
22 }
It works perfectly....but only on the original salesforce page.
The Files tab on the lightning page looks like this:
There are numerous things I have tried to install or read about on the guide, on github, and on the salesforce forum but none of them seem to properly place the files in the Files tab of lightning.
What functionality could I add to apex to simply upload the files, content and all, to the Files tab in Lightning?