mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-23 04:41:19 +00:00
parent
4f0059198e
commit
6337762ec7
1 changed files with 42 additions and 0 deletions
|
@ -262,6 +262,12 @@
|
||||||
+ [All](#all)
|
+ [All](#all)
|
||||||
+ [Community](#community-1)
|
+ [Community](#community-1)
|
||||||
+ [User](#user)
|
+ [User](#user)
|
||||||
|
* [Images](#images)
|
||||||
|
+ [Get](#get)
|
||||||
|
+ [Create](#create)
|
||||||
|
- [Request](#request-58)
|
||||||
|
- [Response](#response-58)
|
||||||
|
+ [Delete](#delete)
|
||||||
|
|
||||||
<!-- tocstop -->
|
<!-- tocstop -->
|
||||||
|
|
||||||
|
@ -2032,3 +2038,39 @@ Only the recipient can do this.
|
||||||
|
|
||||||
`/feeds/u/user-name.xml?sort=Hot`
|
`/feeds/u/user-name.xml?sort=Hot`
|
||||||
|
|
||||||
|
### Images
|
||||||
|
|
||||||
|
Lemmy forwards image requests to a locally running Pictrs.
|
||||||
|
|
||||||
|
#### Get
|
||||||
|
|
||||||
|
*Format and thumbnail are optional.*
|
||||||
|
|
||||||
|
`GET /pictrs/image/{filename}?format={webp, jpg, ...}&thumbnail={96}`
|
||||||
|
|
||||||
|
#### Create
|
||||||
|
|
||||||
|
##### Request
|
||||||
|
|
||||||
|
Uploaded content must be valid multipart/form-data with an image array located within the images[] key.
|
||||||
|
|
||||||
|
`POST /pictrs/image`
|
||||||
|
|
||||||
|
##### Response
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"delete_token": "{token}",
|
||||||
|
"file": "{file}.jpg"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"msg": "ok"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Delete
|
||||||
|
|
||||||
|
`GET /pictrs/image/delete/{delete_token}/{file}`
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue