Getting error message 'invalid file extension' when trying to upload a file?