---
title: fileType
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/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](uikit/nstextattachment/bounds.md)
- [contents](uikit/nstextattachment/contents.md)
- [image](uikit/nstextattachment/image.md)
- [fileWrapper](uikit/nstextattachment/filewrapper.md)
- [allowsTextAttachmentView](uikit/nstextattachment/allowstextattachmentview.md)
- [usesTextAttachmentView](uikit/nstextattachment/usestextattachmentview.md)
- [lineLayoutPadding](uikit/nstextattachment/linelayoutpadding.md)
