- Traditional Downloads: Files are downloaded to the browser instance and then stored by Anchor for retrieval
To download PDF files directly instead of viewing them in the browser, set
pdf_viewer to false when creating your session.- P2P Downloads: Files are captured directly in the browser using peer-to-peer technology, available instantly without waiting for Anchor storage
Traditional File Downloads
The following examples demonstrate how to download a file using the traditional method and retrieve it from the browser session.1
Create a browser session
Use the create session API to create a new browser session.
To enable automatic PDF downloads, include the following
browser configuration:2
Browse and download a file
Use the following example to perform a file download
3
Fetch the file from the browser session
You can retrieve the downloaded file from the browser session using the get session downloads API
Keep downloads across sessions
Downloads are normally stored per session. To keep them in a folder your team owns, mount a volume into the session: every download then lands in the volume’sdownloads/ folder, and any later session that mounts the same volume sees it.

