Add validation for file type
Added comment to explain reason for implementing validation in set_content_type