Skip to main content

ChatAttachmentEventArgs

Namespace: Wisej.Web.Ext.Syncfusion2

Assembly: Wisej.Web.Ext.Syncfusion2 (4.1.0.0)

Carries attachment details for chat upload, remove, and click operations.

public class ChatAttachmentEventArgs : ChatCancelableEventArgs

Constructors​

Instance member ChatAttachmentEventArgs(attachment, files, message, chunkSize, currentChunkIndex, operation, postRawFile, statusText, currentRequest, customFormData, response, cancel, name, data)​

Initializes a new instance of the ChatAttachmentEventArgs class.

NameTypeDescription
attachmentChatAttachmentThe file the operation refers to.
filesChatAttachment[]All the files involved in the operation.
messageChatMessageThe message that contains the attachment, or null.
chunkSizeInt32The chunk size reported by the uploader, or 0 when it is not available.
currentChunkIndexInt32The index of the current chunk reported by the uploader, or -1 when it is not available.
operationStringThe name of the uploader operation. A null value is stored as an empty string.
postRawFileBooleanThe postRawFile flag reported by the uploader.
statusTextStringThe status text reported by the uploader. A null value is stored as an empty string.
currentRequestObjectThe request information reported by the uploader, or null.
customFormDataObjectThe custom form data reported by the uploader, or null.
responseObjectThe response information reported by the uploader, or null.
cancelBooleanThe initial value of Cancel.
nameStringThe name of the client event.
dataObjectThe raw event data received from the browser, or null.

Example:

The following example, placed in a class derived from Chat, raises AttachmentClick for the attachment of a message.

ChatMessage message = this.Messages[0];
ChatAttachment file = message.AttachedFile;
this.OnAttachmentClick(new ChatAttachmentEventArgs(
file, new[] { file }, message,
0, -1, "", false, "",
null, null, null,
false, "attachmentClick", null));

Properties​

Instance member Attachment​

ChatAttachment: Gets the file the operation refers to: the file that was clicked, uploaded or removed.

When the browser does not identify a single file, the value is the first entry of Files. It can be null when the browser reports no file at all.

Instance member ChunkSize​

Int32: Gets the chunk size reported by the uploader for chunked uploads, or 0 when it is not available.

Instance member CurrentChunkIndex​

Int32: Gets the index of the chunk being uploaded, or -1 when it is not available.

Instance member CurrentRequest​

Object: Gets the request information reported by the uploader, or null when there is none.

The value is a dynamic object that contains only the simple fields that the client wrapper could copy from the uploader event.

Instance member CustomFormData​

Object: Gets the custom form data reported by the uploader, or null when there is none.

Instance member Files​

ChatAttachment[]: Gets all the files involved in the operation.

The value can be null when the browser reports no file list.

Instance member Message​

ChatMessage: Gets the message that contains the attachment.

The message is reported only by AttachmentClick, when the browser provides it. The value is null for the upload and remove events, which refer to files that are still in the composer.

Instance member Operation​

String: Gets the name of the uploader operation reported by the browser, or an empty string when it is not available.

Instance member PostRawFile​

Boolean: Gets the postRawFile flag reported by the uploader.

Instance member Response​

Object: Gets the response information reported by the uploader, or null when there is none.

The value is a dynamic object that contains only the simple fields that the client wrapper could copy from the uploader event.

Instance member StatusText​

String: Gets the status text reported by the uploader, or an empty string when it is not available.