Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a file attachment.

Hierarchy

Index

Constructors

constructor

  • internal

    Initializes a new instance of the FileAttachment class.

    Parameters

    • owner: Item

      The owner of the attachment.

    Returns FileAttachment

  • internal

    Initializes a new instance of the FileAttachment class.

    Parameters

    Returns FileAttachment

Properties

Namespace

Namespace: XmlNamespace

OnChange

____implementsInterface

____implementsInterface: string[]

____typeName

____typeName: string

Private base64Content

base64Content: string

Private fileName

fileName: string

Private isContactPhoto

isContactPhoto: boolean

Accessors

Base64Content

  • get Base64Content(): string
  • set Base64Content(value: string): void
  • Gets the base64 content of the attachment into memory. Content is set only when Load() is called.

    Returns string

  • Gets the base64 content of the attachment into memory. Content is set only when Load() is called.

    Parameters

    • value: string

    Returns void

ContentId

  • get ContentId(): string
  • set ContentId(value: string): void
  • Gets or sets the content Id of the attachment. ContentId can be used as a custom way to identify an attachment in order to reference it from within the body of the item the attachment belongs to.

    Returns string

  • Gets or sets the content Id of the attachment. ContentId can be used as a custom way to identify an attachment in order to reference it from within the body of the item the attachment belongs to.

    Parameters

    • value: string

    Returns void

ContentLocation

  • get ContentLocation(): string
  • set ContentLocation(value: string): void
  • Gets or sets the content location of the attachment. ContentLocation can be used to associate an attachment with a Url defining its location on the Web.

    Returns string

  • Gets or sets the content location of the attachment. ContentLocation can be used to associate an attachment with a Url defining its location on the Web.

    Parameters

    • value: string

    Returns void

ContentType

  • get ContentType(): string
  • set ContentType(value: string): void
  • Gets or sets the content type of the attachment.

    Returns string

  • Gets or sets the content type of the attachment.

    Parameters

    • value: string

    Returns void

FileName

  • get FileName(): string
  • set FileName(value: string): void
  • Gets the name of the file the attachment is linked to.

    Returns string

  • Gets the name of the file the attachment is linked to.

    Parameters

    • value: string

    Returns void

Id

  • get Id(): string
  • set Id(value: string): void
  • Gets the Id of the attachment.

    Returns string

  • Gets the Id of the attachment.

    Parameters

    • value: string

    Returns void

IsContactPhoto

  • get IsContactPhoto(): boolean
  • set IsContactPhoto(value: boolean): void
  • Gets or sets a value indicating whether this attachment is a contact photo.

    Returns boolean

  • Gets or sets a value indicating whether this attachment is a contact photo.

    Parameters

    • value: boolean

    Returns void

IsInline

  • get IsInline(): boolean
  • set IsInline(value: boolean): void
  • Gets or sets a value indicating whether this is an inline attachment. Inline attachments are not visible to end users.

    Returns boolean

  • Gets or sets a value indicating whether this is an inline attachment. Inline attachments are not visible to end users.

    Parameters

    • value: boolean

    Returns void

IsNew

  • get IsNew(): boolean
  • internal

    True if the attachment has not yet been saved, false otherwise.

    Returns boolean

LastModifiedTime

  • Gets the date and time when this attachment was last modified.

    Returns DateTime

  • Gets the date and time when this attachment was last modified.

    Parameters

    Returns void

Name

  • get Name(): string
  • set Name(value: string): void
  • Gets or sets the name of the attachment.

    Returns string

  • Gets or sets the name of the attachment.

    Parameters

    • value: string

    Returns void

Owner

  • internal

    Gets the owner of the attachment.

    Returns Item

Service

Size

  • get Size(): number
  • set Size(value: number): void
  • Gets the size of the attachment.

    Returns number

  • Gets the size of the attachment.

    Parameters

    • value: number

    Returns void

Methods

Changed

  • Changed(): void

ClearChangeLog

  • ClearChangeLog(): void

GetXmlElementName

  • GetXmlElementName(): string
  • internal

    Gets the name of the XML element.

    Returns string

    XML element name.

InternalLoad

InternalLoadFromXmlJsObject

  • InternalLoadFromXmlJsObject(jsObject: any, service: ExchangeService, readAction: function): void

InternalValidate

  • InternalValidate(): void

Load

  • Loads the attachment. Calling this method results in a call to EWS.

    Returns IPromise<void>

LoadFromXmlJsObject

ReadAttributesFromXmlJsObject

ReadElementsFromXmlJsObject

  • ReadElementsFromXmlJsObject(jsonProperty: any, service: ExchangeService): void

ReadElementsFromXmlJsObjectToPatch

  • ReadElementsFromXmlJsObjectToPatch(reader: any): boolean

ReadTextValueFromXmlJsObject

SetFieldValue

  • SetFieldValue<T>(field: IRefParam<T>, value: T): void
  • internal

    Sets value of field.

    remarks

    We override the base implementation. Attachments cannot be modified so any attempts the change a property on an existing attachment is an error.

    Type parameters

    • T

    Parameters

    • field: IRefParam<T>

      The field.

    • value: T

      The value.

    Returns void

ThrowIfThisIsNotNew

  • ThrowIfThisIsNotNew(): void
  • internal

    Throws exception if this is not a new service object.

    Returns void

UpdateFromXmlJsObject

Validate

  • Validate(attachmentIndex?: number): void
  • internal

    Validates this instance.

    Parameters

    • Optional attachmentIndex: number

      Index of this attachment.

    Returns void

WriteAttributesToXml

WriteElementsToXml

WriteToXml

Generated using TypeDoc