Uploading files and validating the extensions