dev.knotless.uploadImage
Uploads the body, a PNG, JPEG, WebP or GIF, as a blob of the account logged in to this appview's web pages, as `knotless issue create --image` does: one over 1,000,000 bytes is drawn again as a JPEG that fits, at most 2000 pixels on its longest side. Its PDS keeps it only once a record attaches it: give it as one of dev.knotless.createIssue's, createPull's, createComment's or editItem's `images`, with a body linking to `url`. Requires the session cookie the pages' login sets.
Details · procedure
| Kind | procedure |
|---|---|
| Authority | knotless.dev |
| Indexed |
Showing version bafyreibhpgy3k67u2ngxazh3ezjpfvuft6cuc53eo3ovjhbzwqag774xme. Show the latest
Checks
Valid Lint pass{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"description": "Uploads the body, a PNG, JPEG, WebP or GIF, as a blob of the account logged in to this appview's web pages, as `knotless issue create --image` does: one over 1,000,000 bytes is drawn again as a JPEG that fits, at most 2000 pixels on its longest side. Its PDS keeps it only once a record attaches it: give it as one of dev.knotless.createIssue's, createPull's, createComment's or editItem's `images`, with a body linking to `url`. Requires the session cookie the pages' login sets.",
"errors": [
{
"description": "No such repository.",
"name": "NotFound"
},
{
"description": "No picture, or one that is not a PNG, JPEG, WebP or GIF.",
"name": "InvalidRequest"
},
{
"description": "No account is logged in to the pages, or its session has ended.",
"name": "AuthenticationRequired"
}
],
"input": {
"encoding": "*/*"
},
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"blob": {
"accept": [
"image/png",
"image/jpeg",
"image/webp",
"image/gif"
],
"description": "The picture as uploaded, to attach.",
"maxSize": 1000000,
"type": "blob"
},
"height": {
"description": "How high it is drawn, in CSS pixels.",
"minimum": 1,
"type": "integer"
},
"url": {
"description": "Where its account's PDS serves it, for the body to link to.",
"format": "uri",
"type": "string"
},
"width": {
"description": "How wide it is drawn, in CSS pixels, as dev.knotless.defs#image's `width`: its pixels over the density a PNG says it was made at. Give it, and `height`, with the blob in `images`.",
"minimum": 1,
"type": "integer"
}
},
"required": [
"blob",
"url"
],
"type": "object"
}
},
"parameters": {
"properties": {
"repo": {
"description": "The repository's dev.knotless.repo record, as dev.knotless.getRepo takes it, whose pull, issue or comment will show it.",
"format": "at-uri",
"type": "string"
}
},
"required": [
"repo"
],
"type": "params"
},
"type": "procedure"
}
},
"description": "Uploads a picture to show in a pull, an issue or a comment, as the account logged in to this appview's pages.",
"id": "dev.knotless.uploadImage",
"lexicon": 1
}