1. Enable Allow site guest users to upload files in Salesforce Files General Settings.
![](https://www.infallibletechie.com/wp-content/uploads/2019/06/Enable2BAllow2Bsite2Bguest2Busers2Bto2Bupload2Bfiles2Bin2BSalesforce2BFiles2BGeneral2BSettings.png)
2. Go to Community Preferences and update Maximum file size and file types.
![](https://www.infallibletechie.com/wp-content/uploads/2019/06/Salesforce2BFiles2BSettings2Bin2BCommunity.png)
3. Create a custom lightning component using lightning:fileUpload tag.
Sample code – https://www.infallibletechie.com/2018/03/sample-code-component.html
4. Make sure the component implements forceCommunity:availableForAllPageTypes. Add the custom lightning component to the community page.