Class ImageAttachment
Represents an attachment to a GroupMe Message containing an image.
Namespace: GroupMeClientApi.Models.Attachments
Assembly: GroupMeClientApi.dll
Syntax
public class ImageAttachment : Attachment
Properties
| Improve this Doc View SourceDefaultUploadBlockSize
Gets the default buffer size, in bytes, used for uploading content.
Declaration
public static int DefaultUploadBlockSize { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
SupportedExtensions
Gets a listing of supported extension for GroupMe Image Attachments.
Declaration
public static IEnumerable<string> SupportedExtensions { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<String> |
Type
Gets the attachment type.
Declaration
public override string Type { get; }
Property Value
| Type | Description |
|---|---|
| String |
Overrides
| Improve this Doc View SourceUrl
Gets the URL of the image attachment.
Declaration
public string Url { get; }
Property Value
| Type | Description |
|---|---|
| String |
Methods
| Improve this Doc View SourceCreateImageAttachment(Byte[], IMessageContainer, UploadProgress)
Uploads an image to GroupMe and returns the created ImageAttachment.
Declaration
public static Task<ImageAttachment> CreateImageAttachment(byte[] image, IMessageContainer messageContainer, UploadProgress uploadProgress = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Byte[] | image | The image to upload. |
| IMessageContainer | messageContainer | The IMessageContainer that the message is being sent to. |
| UploadProgress | uploadProgress | A monitor that will receive progress updates for the image upload operation. |
Returns
| Type | Description |
|---|---|
| Task<ImageAttachment> | An ImageAttachment if uploaded successfully, null otherwise. |