# Class OutgoingAttachment | EchoHub Documentation
One file to upload as part of a message. For end-to-end encrypted channels the stream is already ciphertext, is set (image/audio/file), and holds the room-encrypted ASCII art for images. For normal channels only and are set.

# Class OutgoingAttachment

Namespace
  EchoHub.Client.Services

Assembly
  EchoHub.Client.dll

One file to upload as part of a message. For end-to-end encrypted channels the stream is already ciphertext, DeclaredKind is set (image/audio/file), and EncryptedPreview holds the room-encrypted ASCII art for images. For normal channels only Stream and FileName are set.

    public sealed record OutgoingAttachment : IEquatable<OutgoingAttachment>

Inheritance
  object
  OutgoingAttachment

Implements
  IEquatable<OutgoingAttachment>

Inherited Members
  object.GetType()
  object.Equals(object, object)
  object.ReferenceEquals(object, object)

## Constructors

### OutgoingAttachment(Stream, string, string?, string?)

One file to upload as part of a message. For end-to-end encrypted channels the stream is already ciphertext, DeclaredKind is set (image/audio/file), and EncryptedPreview holds the room-encrypted ASCII art for images. For normal channels only Stream and FileName are set.

    public OutgoingAttachment(Stream Stream, string FileName, string? DeclaredKind = null, string? EncryptedPreview = null)

#### Parameters

`Stream` Stream
`FileName` string
`DeclaredKind` string
`EncryptedPreview` string

## Properties

### DeclaredKind

    public string? DeclaredKind { get; init; }

#### Property Value

string

### EncryptedPreview

    public string? EncryptedPreview { get; init; }

#### Property Value

string

### FileName

    public string FileName { get; init; }

#### Property Value

string

### Stream

    public Stream Stream { get; init; }

#### Property Value

Stream

## Methods

### Deconstruct(out Stream, out string, out string?, out string?)

    public void Deconstruct(out Stream Stream, out string FileName, out string? DeclaredKind, out string? EncryptedPreview)

#### Parameters

`Stream` Stream
`FileName` string
`DeclaredKind` string
`EncryptedPreview` string

### Equals(OutgoingAttachment?)

    public bool Equals(OutgoingAttachment? other)

#### Parameters

`other` OutgoingAttachment

#### Returns

bool

### Equals(object?)

    public override bool Equals(object? obj)

#### Parameters

`obj` object

#### Returns

bool

### GetHashCode()

    public override int GetHashCode()

#### Returns

int

### ToString()

    public override string ToString()

#### Returns

string

## Operators

### operator ==(OutgoingAttachment?, OutgoingAttachment?)

    public static bool operator ==(OutgoingAttachment? left, OutgoingAttachment? right)

#### Parameters

`left` OutgoingAttachment
`right` OutgoingAttachment

#### Returns

bool

### operator !=(OutgoingAttachment?, OutgoingAttachment?)

    public static bool operator !=(OutgoingAttachment? left, OutgoingAttachment? right)

#### Parameters

`left` OutgoingAttachment
`right` OutgoingAttachment

#### Returns

bool