# app.thesocialwire.socialDraft.uploadAttachment

> Owner-only private draft storage. Authentication required; disabled storage returns Unavailable. Never publishes attachments or exposes public URLs. Requires X-Social-Draft-Upload-Id header containing the reserved assetId and known Content-Length from 1 to 104857600 bytes. Unknown length returns 411; oversize returns 413.

- Kind: procedure
- Authority: socialDraft.thesocialwire.app
- Lexicon: 1
- Published by [samclemente.me](https://lexicon.garden/identity/did:plc:qy5pluw2bsuq2x6albsgkvx3), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:qy5pluw2bsuq2x6albsgkvx3/app.thesocialwire.socialDraft.uploadAttachment)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:qy5pluw2bsuq2x6albsgkvx3/app.thesocialwire.socialDraft.uploadAttachment/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:qy5pluw2bsuq2x6albsgkvx3/app.thesocialwire.socialDraft.uploadAttachment/analytics)

## Procedure (`app.thesocialwire.socialDraft.uploadAttachment`)

Type: procedure · POST

### Input (application/octet-stream)


### Output (application/json)

- `attachment` (ref, required)
  - Reference: `app.thesocialwire.socialDraft.defs#asset`

### Errors

- `InvalidRequest`: No description in schema.
- `NotFound`: No description in schema.
- `Conflict`: No description in schema.
- `Quota`: No description in schema.
- `UploadPending`: No description in schema.
- `Unavailable`: No description in schema.
- `Unauthorized`: No description in schema.
- `LengthRequired`: No description in schema.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Owner-only private draft storage. Authentication required; disabled storage returns Unavailable. Never publishes attachments or exposes public URLs. Requires X-Social-Draft-Upload-Id header containing the reserved assetId and known Content-Length from 1 to 104857600 bytes. Unknown length returns 411; oversize returns 413.",
      "errors": [
        {
          "name": "InvalidRequest"
        },
        {
          "name": "NotFound"
        },
        {
          "name": "Conflict"
        },
        {
          "name": "Quota"
        },
        {
          "name": "UploadPending"
        },
        {
          "name": "Unavailable"
        },
        {
          "name": "Unauthorized"
        },
        {
          "name": "LengthRequired"
        }
      ],
      "input": {
        "encoding": "application/octet-stream"
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "attachment": {
              "ref": "app.thesocialwire.socialDraft.defs#asset",
              "type": "ref"
            }
          },
          "required": [
            "attachment"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "app.thesocialwire.socialDraft.uploadAttachment",
  "lexicon": 1
}
```
