def markdown(self, file_path: str) -> str:
        """
        Upload a file and convert it to markdown.

        Args:
            file_path: Path to the file to convert or a URL to download and convert

        Returns:
            The markdown content
        """
        if file_path.startswith("http"):
            # Download file
            response = httpx.get(file_path)
            response.raise_for_status()

            # Save to temporary .html file
            fd, tmp_path = tempfile.mkstemp(suffix=".html")
            os.write(fd, response.content)
            os.close(fd)

            file_path = tmp_path

        if not os.path.exists(file_path):
            raise FileNotFoundError(f"File not found: {file_path}")

        # Read the file and prepare for upload
        with open(file_path, "rb") as f:
            files = {"file": (os.path.basename(file_path), f)}
            response = self.send_request("/markdown/upload", {}, files=files)
            
        if file_path.startswith("/tmp"):
            os.remove(file_path)  # Delete temporary HTML file

        return response.get("markdown")

        Upload a file and convert it to markdown.

        Args:
            file_path: Path to the file to convert or a URL to download and convert

        Returns:
            The markdown content
        
src/upsonic/client/markdown/markdown.py