MailSlurp JS

Globals / AttachmentControllerApi

# Class: AttachmentControllerApi

AttachmentControllerApi - object-oriented interface

export

# Hierarchy

  • BaseAPI

    AttachmentControllerApi

# Index

# Constructors

# Properties

# Methods

# Constructors

# constructor

+ new AttachmentControllerApi(configuration?: Configuration, basePath?: string, fetch?: FetchAPI): AttachmentControllerApi

Inherited from BaseAPI.constructor

Defined in src/generated/api.ts:57 (opens new window)

# Parameters:

Name Type Default value
configuration? Configuration -
basePath string BASE_PATH
fetch FetchAPI portableFetch

Returns: AttachmentControllerApi

# Properties

# basePath

Protected basePath: string

Inherited from BaseAPI.basePath

Defined in src/generated/api.ts:61 (opens new window)


# configuration

Protected configuration: Configuration

Inherited from BaseAPI.configuration

Defined in src/generated/api.ts:57 (opens new window)


# fetch

Protected fetch: FetchAPI

Inherited from BaseAPI.fetch

Defined in src/generated/api.ts:62 (opens new window)

# Methods

# uploadAttachment

uploadAttachment(uploadOptions: UploadAttachmentOptions, options?: any): Promise<string[]>

Defined in src/generated/api.ts:4292 (opens new window)

Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with SendEmailOptions when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused.

summary Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment.

throws {RequiredError}

memberof AttachmentControllerApi

# Parameters:

Name Type Description
uploadOptions UploadAttachmentOptions uploadOptions
options? any -

Returns: Promise<string[]>


# uploadAttachmentBytes

uploadAttachmentBytes(string?: string, byteArray?: string, filename?: string, options?: any): Promise<string[]>

Defined in src/generated/api.ts:4312 (opens new window)

Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with SendEmailOptions when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused.

summary Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment.

throws {RequiredError}

memberof AttachmentControllerApi

# Parameters:

Name Type
string? string
byteArray? string
filename? string
options? any

Returns: Promise<string[]>


# uploadMultipartForm

uploadMultipartForm(file: any, contentType?: string, contentTypeHeader?: string, filename?: string, xFilename?: string, options?: any): Promise<string[]>

Defined in src/generated/api.ts:4338 (opens new window)

Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with SendEmailOptions when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused.

summary Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment.

throws {RequiredError}

memberof AttachmentControllerApi

# Parameters:

Name Type Description
file any file
contentType? string -
contentTypeHeader? string -
filename? string -
xFilename? string -
options? any -

Returns: Promise<string[]>