place.hud.uploadAppBlob

Upload a file for a frame app (a picture, a recording, or another file as application/octet-stream, the person chose) to the person's PDS as their blob, for an entry they write next. Its Content-Type is a type one of the app's kinds takes (a blob field's accept), the body its bytes, no larger than the largest maxSize the kinds give that type. Checked before the PDS hears of it: the app, the type and size, the bytes being that type, the person being one of its writers where it names them, the person having allowed the app (place.hud.allowAppEntries) and their sign-in asking to upload that type. 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.

Details · procedure
Kindprocedure
Authorityhud.place
Commit rev3n3ki5cfwgoju
Indexed

Showing version bafyreie3ydibya6icwzc3gsfkyiwhr7s5irfweogsgqwetnaokagpmvlfu. Show the latest

cid bafyreie3ydibya6icwzc3gsfkyiwhr7s5irfweogsgqwetnaokagpmvlfu

Checks

Valid Lint pass
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Upload a file for a frame app (a picture, a recording, or another file as application/octet-stream, the person chose) to the person's PDS as their blob, for an entry they write next. Its Content-Type is a type one of the app's kinds takes (a blob field's accept), the body its bytes, no larger than the largest maxSize the kinds give that type. Checked before the PDS hears of it: the app, the type and size, the bytes being that type, the person being one of its writers where it names them, the person having allowed the app (place.hud.allowAppEntries) and their sign-in asking to upload that type. 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": "Neither app nor preview given; or the file is not of a type the app's kinds take, is larger than they take, or its bytes are not that type.",
          "name": "InvalidRequest"
        },
        {
          "description": "A preview's: it saves nothing.",
          "name": "Preview"
        },
        {
          "description": "No such app, or this server took it down.",
          "name": "NotFound"
        },
        {
          "description": "The person has not allowed the app to save their entries.",
          "name": "ConsentRequired"
        },
        {
          "description": "The app names its writers, and the person is none of them.",
          "name": "NotAWriter"
        },
        {
          "description": "The body is over 10,000,000 bytes.",
          "name": "BlobTooLarge"
        },
        {
          "description": "The person's PDS could not be reached or refused the file; or their sign-in does not ask to upload this type, and the message says to sign in again.",
          "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 an entry's data as it is.",
              "type": "blob"
            }
          },
          "required": [
            "blob"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "app": {
            "description": "The app's place.hud.app record, its authority a DID or a handle.",
            "format": "at-uri",
            "type": "string"
          },
          "preview": {
            "description": "A preview's id, in place of app: refused, as a preview saves nothing.",
            "maxLength": 64,
            "type": "string"
          }
        },
        "type": "params"
      },
      "type": "procedure"
    }
  },
  "description": "Upload a file a frame app's entry holds to the person's PDS.",
  "id": "place.hud.uploadAppBlob",
  "lexicon": 1
}