public function setUploadDir(string $uploadDir): Server
	{

		$uploadDir = \realpath($uploadDir);
		if (!is_dir($uploadDir))
			throw new ThunderTUSException("Invalid upload directory. Path doesn't exist or it isn't a directory.");

		$this->uploadDir = $uploadDir;

		return $this;
	}