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 (with instance, one of the instance's writable members), the person having allowed the app (place.hud.allowAppEntries) and their sign-in asking to upload that type. An entry in a private instance referencing it, its PDS serves it only through the space (com.atproto.space.getBlob). 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 rev3n3knrck5esju
Indexed
cid bafyreigos7qqb27qvsqt55iwuplxsdn4lsfmpl5237rvkhbrs6hrpmb4qi

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 (with instance, one of the instance's writable members), the person having allowed the app (place.hud.allowAppEntries) and their sign-in asking to upload that type. An entry in a private instance referencing it, its PDS serves it only through the space (com.atproto.space.getBlob). 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": "With instance: the person is not one of its members, or there is no such instance.",
          "name": "NotAMember"
        },
        {
          "description": "With instance: the person's PDS gives no delegation token to read it with.",
          "name": "CannotRead"
        },
        {
          "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"
          },
          "instance": {
            "description": "A private instance of the app (at:space/<authority DID>/place.hud.app.instance/<key>), whose entry will hold it.",
            "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
}