public static function instance($name = NULL, array $config = NULL)
	{
		if ($name === NULL)
		{
			// Use the default instance name
			$name = Upload_Server::$default;
		}

		if ( ! isset(Upload_Server::$instances[$name]))
		{
			if ($config === NULL)
			{
				// Load the configuration for this database
				$config = Arr::get(Kohana::$config->load('jam.upload.servers'), $name);
			}

			$validation = Validation::factory($config)
				->rule('type', 'not_empty')
				->rule('params', 'not_empty')
				->rule('params', 'is_array');

			if ( ! $validation->check())
				throw new Kohana_Exception('Upload server config had errors: :errors',
					array(':errors' => join(', ', $validation->errors('upload_server'))));

			$server = 'server_'.$validation['type'];
			Upload_Server::$instances[$name] = Upload_Server::$server($validation['params']);
		}

		return Upload_Server::$instances[$name];
	}