DOIP Client Library - JavaScript Version
    Preparing search index...

    Interface Element

    Elements are used to store binary data (like files or attachments) associated with a digital object. Each element has an identifier and can optionally include metadata about the content. When making a request, ElementWithBody can be used to provide the element bytes using other JavaScript types.

    interface Element {
        id: string;
        type?: string;
        length?: number;
        attributes?: Record<string, Json>;
        body?: ReadableStream<Uint8Array<ArrayBuffer>>;
    }

    Implemented by

    Index

    Properties

    id: string

    The identifier of the element within the digital object. This is used to reference the element when retrieving it.

    type?: string

    The MIME type of the element's content. For example, "application/pdf" or "image/jpeg".

    length?: number

    The length of the element's content in bytes.

    attributes?: Record<string, Json>

    Additional metadata about the element. This can include information like filename.

    body?: ReadableStream<Uint8Array<ArrayBuffer>>

    The binary content of the element as a readable stream. This is typically present when retrieving an element or when creating/updating an element with streaming content. When making a request, ElementWithBody can be used to provide the element bytes using other JavaScript types.