added comments to describe file upload code