Create a link that downloads one file from a sandbox.
The link carries its own token, so anyone holding the URL can fetch that one file without a LangSmith credential. It is pinned to the sandbox and the exact path and cannot be repointed at another file. Fetching wakes a stopped sandbox.
Do not modify the file after minting a link for it. The link is pinned to a path, not to a snapshot of the contents, so a later write to that path may or may not be reflected in what the link serves. Write a new file and mint a new link when the contents change.
generateDownloadURL(
name: string,
path: string,
options: GenerateDownloadURLOptions = {}
): Promise<DownloadURL>| Name | Type | Description |
|---|---|---|
name* | string | Sandbox name. |
path* | string | File path inside the sandbox. |
options | GenerateDownloadURLOptions | Default: {}Expiry and response header overrides. |
const link = await client.generateDownloadURL("my-vm", "/tmp/report.pdf");
console.log(link.download_url);