social.colibri.beta.community.putImage
Sets a community's picture or banner. The bytes are uploaded to the community's own repo, which is why this goes through the AppView: a community's blobs can only be written with the community credentials the AppView holds, and a space record must reference a blob living in the repo that holds the record. Replaces whatever was there before.
Details · procedure
| Kind | procedure |
|---|---|
| Authority | community.beta.colibri.social |
| Indexed |
Checks
Validunlimited-stringdefs.main.parameters.properties.kindNo maxLength, maxGraphemes or format limits this string.
{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"description": "Sets a community's picture or banner. The bytes are uploaded to the community's own repo, which is why this goes through the AppView: a community's blobs can only be written with the community credentials the AppView holds, and a space record must reference a blob living in the repo that holds the record. Replaces whatever was there before.",
"errors": [
{
"description": "The request is missing, malformed, or unverifiable service auth.",
"name": "AuthRequired"
},
{
"description": "The requesting user lacks the community.manage permission.",
"name": "Forbidden"
},
{
"description": "No community exists with that DID.",
"name": "CommunityNotFound"
},
{
"description": "The bytes are not one of the accepted image types.",
"name": "UnsupportedImage"
},
{
"description": "The image exceeds the size limit for this kind.",
"name": "ImageTooLarge"
},
{
"description": "The AppView's stored credentials for this community are missing or unusable.",
"name": "CredentialsUnavailable"
},
{
"description": "A PDS or third-party call the AppView depends on failed.",
"name": "UpstreamFailure"
}
],
"input": {
"description": "The raw image bytes. The content type must be one of image/jpeg, image/png, image/gif or image/webp, and is sniffed rather than trusted.",
"encoding": "image/*"
},
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"community": {
"description": "The community with the new image resolved, so one call is enough to re-render.",
"ref": "social.colibri.beta.community.defs#communityView",
"type": "ref"
}
},
"required": [
"community"
],
"type": "object"
}
},
"parameters": {
"properties": {
"community": {
"description": "The community to set the image on.",
"format": "did",
"type": "string"
},
"kind": {
"description": "Which image to set.",
"knownValues": [
"picture",
"banner"
],
"type": "string"
}
},
"required": [
"community",
"kind"
],
"type": "params"
},
"type": "procedure"
}
},
"id": "social.colibri.beta.community.putImage",
"lexicon": 1
}