Integrate Salesforce and Sharepoint using Aura component
Do you want to upload file(i.e up-to 2 GB) to sharepoint from aura component? If yes, here’s the solution for you.
Create a aura component(.cmp) and define a lightning:input(type=’file’) component to get the file from user.
Define a onchange event handler(handleFilesChange) in .js controller file.
Define a .js helper file that has actual logic to upload a file to Share Point.
- Creates the dummy file in sharepoint, determines the chunk sizes based on the file size and the share point REST method for each chunk upload.
- Recursively called to upload each chunk to the sharepoint.
- Slices the file blob into the chunk.
- Generates the unique global identifier.