More details about the code here: www.salesforceprofs.com/how-to-download-files-in-salesforce-community