WebUIで画像の追加をすると以下のようなAPIが使われる
POST https://lemmy.juggler.jp/pictrs/image
POST /pictrs/image HTTP/2
Host: lemmy.juggler.jp
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0
Accept: */*
Accept-Language: ja,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate, br
Referer: https://lemmy.juggler.jp/create_post?community_id=16
Content-Type: multipart/form-data; boundary=---------------------------81315686410589659472095494909
Content-Length: 1046
Origin: https://lemmy.juggler.jp
Connection: keep-alive
Cookie: jwt=****
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
TE: trailers
-----------------------------81315686410589659472095494909
Content-Disposition: form-data; name="images[]"; filename="redcircle.png"
Content-Type: image/png
(binary data)
-----------------------------81315686410589659472095494909--
HTTP/2 201 Created
server: nginx
date: Tue, 16 Aug 2022 10:36:58 GMT
content-type: application/json
content-length: 128
strict-transport-security: max-age=63072000
referrer-policy: same-origin
x-content-type-options: nosniff
x-frame-options: DENY
x-xss-protection: 1; mode=block
access-control-allow-origin: *
X-Firefox-Spdy: h2
{
"msg": "ok",
"files": [
{
"file": "eb6cdbfd-61bc-48c6-a8c1-12cdace4543c.png",
"delete_token": "cd24f0c8-7942-4cef-a21a-e80414e69e6f"
}
]
}
