# am.noz.atgallery.alpha.libraryMedia

> Published by [noz.am](https://lexicon.garden/identity/did:plc:lmkzmvv6sdxntwtyxpg7fqqq)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:lmkzmvv6sdxntwtyxpg7fqqq/am.noz.atgallery.alpha.libraryMedia)
- [Documentation](https://lexicon.garden/lexicon/did:plc:lmkzmvv6sdxntwtyxpg7fqqq/am.noz.atgallery.alpha.libraryMedia/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:lmkzmvv6sdxntwtyxpg7fqqq/am.noz.atgallery.alpha.libraryMedia/examples)

## Definitions

### `am.noz.atgallery.alpha.libraryMedia`

**Type**: `record`

A private media original and its safe local preview.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `notes` | `string` | No |  |
| `width` | `integer` | No |  |
| `height` | `integer` | No |  |
| `sha256` | `string` | No |  |
| `preview` | `blob` | Yes |  |
| `original` | `blob` | Yes |  |
| `createdAt` | `string` (datetime) | Yes |  |
| `mediaKind` | `string` | Yes |  |
| `originalMime` | `string` | Yes |  |
| `originalSize` | `integer` | Yes |  |
| `formatVersion` | `integer` | Yes |  |
| `originalFilename` | `string` | Yes |  |
| `extractedMetadata` | `unknown` | No |  |
| `durationMilliseconds` | `integer` | No |  |

## Raw Schema

```json
{
  "id": "am.noz.atgallery.alpha.libraryMedia",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "formatVersion",
          "mediaKind",
          "original",
          "originalFilename",
          "originalMime",
          "originalSize",
          "preview",
          "createdAt"
        ],
        "properties": {
          "notes": {
            "type": "string",
            "maxLength": 20000
          },
          "width": {
            "type": "integer",
            "minimum": 1
          },
          "height": {
            "type": "integer",
            "minimum": 1
          },
          "sha256": {
            "type": "string",
            "maxLength": 64,
            "minLength": 64
          },
          "preview": {
            "type": "blob",
            "accept": [
              "image/webp"
            ],
            "maxSize": 1048576
          },
          "original": {
            "type": "blob",
            "accept": [
              "image/jpeg",
              "image/png",
              "image/webp",
              "image/gif",
              "image/avif",
              "video/mp4"
            ],
            "maxSize": 52428800
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          },
          "mediaKind": {
            "type": "string",
            "maxLength": 16,
            "knownValues": [
              "image",
              "video"
            ]
          },
          "originalMime": {
            "type": "string",
            "maxLength": 100,
            "knownValues": [
              "image/jpeg",
              "image/png",
              "image/webp",
              "image/gif",
              "image/avif",
              "video/mp4"
            ]
          },
          "originalSize": {
            "type": "integer",
            "maximum": 52428800,
            "minimum": 1
          },
          "formatVersion": {
            "type": "integer",
            "const": 1
          },
          "originalFilename": {
            "type": "string",
            "maxLength": 1024
          },
          "extractedMetadata": {
            "type": "unknown"
          },
          "durationMilliseconds": {
            "type": "integer",
            "maximum": 60000,
            "minimum": 1
          }
        }
      },
      "description": "A private media original and its safe local preview."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
