@camera.ui/sdk / manager / DownloadManager
Interface: DownloadManager
Defined in: manager/index.ts:156
Download manager interface for token-based file downloads.
Allows plugins to register files for HTTP download via a token URL. No JWT authentication is needed — the token itself is the auth.
Accessed via api.downloadManager in plugins.
Example
const { token, url } = await api.downloadManager.createDownload({
filePath: '/tmp/export.mp4',
filename: 'recording.mp4',
mimeType: 'video/mp4',
ttlMs: 600000,
deleteFileAfterDownload: true,
});Methods
createDownload()
createDownload(
options):Promise<DownloadToken>
Defined in: manager/index.ts:164
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:174
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:181
Remove a download token and optionally delete the file.
Parameters
token
string
The download token to remove
Returns
Promise<void>