# Share files with a browser Use {py:meth}`Client.share() ` to publish files at a browser-download URL. Start the client first and set `advertise_host` to this machine's LAN IP address so another device can reach the URL. ## Python This publishes one file and approves each browser download request: ```python from pathlib import Path from localsend import Client, ShareRequest def approve(_request: ShareRequest) -> bool: return True with Client( "My computer", advertise_host="192.168.1.10", on_share_request=approve, ) as client: url = client.share([Path("report.pdf")]) print(url) input("Open the URL in a browser. Press Enter to stop. ") ``` Open the printed URL in a browser on another device connected to the same network. Keep the process running while downloads are in progress. Pass `pin="123456"` to `Client` to require a browser PIN. `on_share_request` receives a {py:class}`ShareRequest ` and must return `True` to authorize the browser download. Browser sharing sessions expire after five minutes by default. See the [Public API](../reference/api.md) for authorization and configuration details.