# Attachment

Represents a file attachment on SMHW.

## Constructor

#### new Attachment(client, response)

Instantiate an attachment object.

Parameters:

Name | Type | Description
--- | --- | ---
`client` | Client | The client that is instantiating the object.
`response` | object | The data for the object.

Source:
  - structures/Attachment.js, line 12

### Members

#### (private) _client :Client

The client that instantiated this object.

Type:

- Client

Source:
  - structures/Attachment.js, line 18

#### content_type :String

The type of attachment file content.

Type:

- String

Source:
  - structures/Attachment.js, line 24

#### created_at :Number

The timestamp of when the attachment was created.

Type:

- Number

Source:
  - structures/Attachment.js, line 30

#### file_size :Number

The file size of the attachment in bytes.

Type:

- Number

Source:
  - structures/Attachment.js, line 36

#### file_url :String

The URL of the attachment file.

Type:

- String

Source:
  - structures/Attachment.js, line 42

#### filename :String

The filename of the attachment file.

Type:

- String

Source:
  - structures/Attachment.js, line 48

#### for_logged_in_only :Boolean

Whether or not the attachment is for logged in users only.

Type:

- Boolean

Source:
  - structures/Attachment.js, line 54

#### id :Number

The ID of the attachment.

Type:

- Number

Source:
  - structures/Attachment.js, line 60

#### is_previewable :Boolean

Whether or not the attachment is previewable.

Type:

- Boolean

Source:
  - structures/Attachment.js, line 66

#### preview_url :String

The preview URL of the attachment.

Type:

- String

Source:
  - structures/Attachment.js, line 72

#### third_party_provider :String

The provider of the file if it is hosted on a third party.

Type:

- String

Source:
  - structures/Attachment.js, line 78

#### third_party_shared_link :String

Type:

- String

Source:
  - structures/Attachment.js, line 83

#### updated_at :Number

The timestamp of when the attachment was last updated.

Type:

- Number

Source:
  - structures/Attachment.js, line 89

#### user_id :Number

The ID of the user who created the attachment.

Type:

- Number

Source:
  - structures/Attachment.js, line 95

### Methods

#### getUser() → {Promise.<User>}

Get the user who created the attachment.

Source:
  - structures/Attachment.js, line 102

Returns:

Type
  Promise.<User>