# Attachment

Represents an attachment entity. Use it in an import script.

Extends [SubItem](Import-SubItem.html).

## Properties

| Name | Type | Description |
| --- | --- | --- |
| author |  [User](Import-User.html)  |  The user who attached the file to the issue.   |
| charset |  string  |  The charset type of the file. `null` by default. Applicable to text attachments only.   |
| created |  string  |  The date and time when the attachment was created. The expected string format is one of those returned by the `getTimestampFormats` function.   |
| fileName |  string  |  The name of the attachment file.   |
| id |  string  |  The ID of the attachment.   |
| mimeType |  string  |  The MIME type of the file.   |
| type |  `&apos;attachment&apos;`  |  Identifies this object as an attachment. YouTrack infers `&apos;attachment&apos;` for values in [DocumentFields.attachments](Import-DocumentFields.html#property-attachments), so you can omit this property.   |
| updated |  string  |    The date and time the attachment was last updated.     The same as `created` by default.     The expected string format is one of those returned by the `getTimestampFormats` function.    |
| updatedBy |  [User](Import-User.html)  |  The user who last updated the file. The same as `author` by default.   |
| visibleToGroups |  Array.<[UserGroup](Import-UserGroup.html)>  |  The user groups that can view the attachment. `null` by default.   |
| visibleToUsers |  Array.<[User](Import-User.html)>  |    The users who can view the attachment.     If none of the `visibleToUsers` and the `visibleToGroups` parameters are specified, the attachment becomes visible to issue or article readers.     `null` by default.    |

## See also

[SubItem](Import-SubItem.html) [User](Import-User.html) [UserGroup](Import-UserGroup.html)

