Interface AddSharedResourceOptions

When adding a shared source there are a number of ways to create it Either from a base64 string, a buffer, a fetch, or a custom resolve function.

interface AddSharedResourceOptions {
    base64?: string | Promise<string>;
    buffer?: ArrayBuffer | Promise<ArrayBuffer> | (() => ArrayBuffer | Promise<ArrayBuffer>);
    fetch?: string | FetchArgs;
    file?: File | Promise<File>;
    mimeType?: string;
    name?: string;
}

Properties

base64?: string | Promise<string>

An encoding for the resource.

buffer?: ArrayBuffer | Promise<ArrayBuffer> | (() => ArrayBuffer | Promise<ArrayBuffer>)

Type declaration

    • (): ArrayBuffer | Promise<ArrayBuffer>
    • Returns ArrayBuffer | Promise<ArrayBuffer>

fetch?: string | FetchArgs
file?: File | Promise<File>
mimeType?: string

Mime type of the resource.

Default Value

'
name?: string

The name of the resource. This is optional and purely for human consumption and is not used by the system.