Attachment Class

Definition

Represents a document attachment in the Azure Cosmos DB database service.

Each document may contain zero or more attachemnts. Attachments can be of any MIME type - text, image, binary data. These are stored externally in Azure Blob storage. Attachments are automatically deleted when the parent document is deleted.

public class Attachment extends Resource

Constructors

Attachment()

Initialize an attachment object.

Attachment(String source)

Initialize an attachment object from json string.

Attachment(JSONObject jsonObject)

Initialize an attachment object from json object.

Methods

getContentType()

Gets the MIME content type of the attachment.

getMediaLink()

Gets the media link associated with the attachment content.

setContentType(String contentType)

Sets the MIME content type of the attachment.

setMediaLink(String mediaLink)

Sets the media link associated with the attachment content.

Inherited Members

Applies to