Tela SDK for JavaScript
    Preparing search index...

    Class Vault

    Vault API resource.

    const tela = new TelaSDK({ apiKey: '...' })

    // Get a temporary signed URL for a vault file
    const url = await tela.vault.getSignedUrl('vault://abc-123')

    // Download the file as a Blob
    const blob = await tela.vault.download('vault://abc-123')

    // Stream the file
    const stream = await tela.vault.stream('vault://abc-123')

    // Resolve any reference (vault:// or https://) to a downloadable URL
    const downloadUrl = await tela.vault.resolve(file.url)
    Index

    Constructors

    Methods

    • Downloads a vault file as a Blob.

      Parameters

      • ref: string

        A vault://<id> reference or a bare vault id.

      Returns Promise<Blob>

    • Returns a temporary signed URL for a vault file.

      Parameters

      • ref: string

        A vault://<id> reference or a bare vault id.

      Returns Promise<string>

      If ref is an https:// URL (already resolved). Use resolve for that case.

    • Resolves any file reference to a downloadable URL.

      • vault://<id> and bare ids are resolved through the vault service.
      • https:// / http:// URLs are returned as-is.

      Parameters

      • ref: string

      Returns Promise<string>

    • Streams a vault file as a ReadableStream.

      Parameters

      • ref: string

        A vault://<id> reference or a bare vault id.

      Returns Promise<ReadableStream<any>>