---
title: fileType
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nstextattachment/filetype
---

# fileType

The file type of the contents for the text attachment.

## Declaration

```swift
var fileType: String? { get set }
```

## Discussion

Discussion Modifying this property has the side effect of invalidating the image property.

## See Also

### Defining the attachment’s contents

- [bounds](appkit/nstextattachment/bounds.md)
- [contents](appkit/nstextattachment/contents.md)
- [image](appkit/nstextattachment/image.md)
- [fileWrapper](appkit/nstextattachment/filewrapper.md)
- [allowsTextAttachmentView](appkit/nstextattachment/allowstextattachmentview.md)
- [usesTextAttachmentView](appkit/nstextattachment/usestextattachmentview.md)
- [lineLayoutPadding](appkit/nstextattachment/linelayoutpadding.md)
