Detects the file type based on file extension before uploading