@ibm-cloud/cloudant - v0.12.13
    Preparing search index...

    Class Attachment

    Schema for an attachment.

    Index

    Constructors

    Properties

    contentType?: string

    Attachment MIME type.

    data?: Buffer

    Base64-encoded content. Available when requested with attachments=true or atts_since. When retrieving attachments for a single document this field is only avialable when accepting an application/json response. For multipart responses each attachment is instead included in a separate part of the response (see follows).

    Note that SDK deserialization of documents with included attachments automatically decodes the Base64 encoded attachment content string to bytes.

    digest?: string

    Content hash digest. It starts with prefix declaring the hash type, md5- for example, and continues with the Base64-encoded hash digest.

    encodedLength?: number

    Compressed attachment size in bytes. Available for compressed attachments when requested with att_encoding_info. The database compresses attachments if the content_type is in the list of compressible types when added.

    encoding?: string

    Compression codec. Available for compressed attachments when requested with att_encoding_info. The database compresses attachments if the content_type is in the list of compressible types when added.

    follows?: boolean

    True if the attachment follows in a multipart request or response.

    length?: number

    Real attachment size in bytes. Not available if inline attachment content requested.

    revpos?: number

    Revision number at attachment addition.

    stub?: boolean

    Has true value if object has stub attachment metadata, but not attachment content. Otherwise omitted in response.

    Methods