move file download link to javascript