@camera.ui/sdk / manager / DownloadManager
Interface: DownloadManager ​
Defined in: manager/index.ts:321
Download manager interface for token-based file downloads.
Plugins register a file and get back a token URL. No JWT is involved, the token itself is the auth.
Accessed via api.downloadManager in plugins.
Example ​
const { token, url } = await api.downloadManager.createDownload({
filePath: `${api.storagePath}/export.mp4`,
filename: 'recording.mp4',
mimeType: 'video/mp4',
ttlMs: 600000,
cleanup: 'on-download',
});Methods ​
createDownload() ​
createDownload(
options):Promise<DownloadToken>
Defined in: manager/index.ts:329
Register a file for download and get a token-based URL.
Parameters ​
options ​
Download options
Returns ​
Promise<DownloadToken>
Token, URL, and expiry information
createStreamDownload() ​
createStreamDownload(
options):Promise<DownloadToken>
Defined in: manager/index.ts:339
Register a streaming file for progressive download. The file is tailed during writing; the marker file signals completion.
Parameters ​
options ​
Streaming download options (includes markerPath)
Returns ​
Promise<DownloadToken>
Token, URL, and expiry information
deleteDownload() ​
deleteDownload(
token):Promise<void>
Defined in: manager/index.ts:346
Remove a download token and optionally delete the file.
Parameters ​
token ​
string
The download token to remove
Returns ​
Promise<void>