What decides the type of an uploaded file? The extension of fileName. fileName also becomes the new file's name. More: MCP, Uploads