{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Upload an image (JPEG, PNG, WebP or HEIC, at most 2,000,000 bytes) to the person's PDS as their blob, as com.atproto.repo.uploadBlob does, for a record they write next (a post's images, a gallery's photos). With purpose app, one of a frame app's files for place.hud.publishApp instead: its document (text/html, UTF-8, at most 2,000,000 bytes), its words (application/json, an object, at most 512,000) or its icon (image/png or image/webp, at most 256,000). Never logged. Requires auth: the workspace's web session (its cookie, with X-HUD: 1 and the server's own Origin) or a HUD access token as Bearer.",
      "errors": [
        {
          "description": "The body is not a JPEG, PNG, WebP or HEIC image sent as one (Content-Type image/*); or, for an app, not a document, words or icon of a type and size its record takes.",
          "name": "InvalidRequest"
        },
        {
          "description": "The body is over 2,000,000 bytes.",
          "name": "BlobTooLarge"
        },
        {
          "description": "The person's PDS could not be reached, refused the blob, or answered something that is not one.",
          "name": "UpstreamFailure"
        },
        {
          "description": "No live session, or its sign-in at the person's PDS ended: sign in again.",
          "name": "AuthRequired"
        }
      ],
      "input": {
        "encoding": "*/*"
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "blob": {
              "description": "The blob, as the PDS answered it: to put in a record as it is.",
              "type": "blob"
            }
          },
          "required": [
            "blob"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "purpose": {
            "description": "app: one of a frame app's files, as its record takes them.",
            "knownValues": [
              "app"
            ],
            "maxLength": 16,
            "type": "string"
          }
        },
        "type": "params"
      },
      "type": "procedure"
    }
  },
  "description": "Upload an image, or a frame app's file, to the person's PDS.",
  "id": "place.hud.uploadBlob",
  "lexicon": 1
}
