# DraftAttachment

<!-- https://uncage.vercel.app/docs/api/react/interfaces/draftattachment/ -->

Defined in: react/src/state.ts:77

A file picked in the composer: validated client-side, then uploaded to the session.

## Properties

| Property | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
| <a id="property-attachment"></a> `attachment?` | `object` | - | react/src/state.ts:90 |
| `attachment.createdAt` | `string` | - | protocol/dist/index.d.ts:169 |
| `attachment.id` | `string` | - | protocol/dist/index.d.ts:159 |
| `attachment.kind` | `"file"` \| `"image"` | - | protocol/dist/index.d.ts:164 |
| `attachment.mime` | `string` | - | protocol/dist/index.d.ts:162 |
| `attachment.name` | `string` | - | protocol/dist/index.d.ts:161 |
| `attachment.sessionId` | `string` | - | protocol/dist/index.d.ts:160 |
| `attachment.sha256` | `string` | - | protocol/dist/index.d.ts:168 |
| `attachment.size` | `number` | - | protocol/dist/index.d.ts:163 |
| <a id="property-error"></a> `error?` | `UncageClientError` | - | react/src/state.ts:91 |
| <a id="property-kind"></a> `kind` | `"file"` \| `"image"` \| `null` | - | react/src/state.ts:82 |
| <a id="property-localid"></a> `localId` | `string` | - | react/src/state.ts:78 |
| <a id="property-name"></a> `name` | `string` | - | react/src/state.ts:79 |
| <a id="property-previewurl"></a> `previewUrl?` | `string` | Image preview: an object URL (`blob:`, revoked on remove/clear/send/dispose) for a browser file, the file's own `uri` for a React Native file reference. | react/src/state.ts:87 |
| <a id="property-size"></a> `size` | `number` | Bytes; `0` when unknown (a React Native file reference without `size`). | react/src/state.ts:81 |
| <a id="property-status"></a> `status` | `"ready"` \| `"error"` \| `"uploading"` | `uploading` also covers files queued until a draft's session exists. | react/src/state.ts:89 |
