guioguoi
This commit is contained in:
@@ -110,3 +110,25 @@ To advertise your `.onion` address to Tor Browser users visiting your clearnet s
|
||||
"onion": "http://yourgeneratedaddress.onion"
|
||||
}
|
||||
```
|
||||
|
||||
## Chat uploads (temporary file hosting for mumh5)
|
||||
|
||||
Upload-only API keys for external chat clients. Files are public, never appear on the imageboard, and expire (default 30 days, see `chat_upload_*` in `config.yaml`).
|
||||
|
||||
Manage keys (the key is shown once, only its hash is stored):
|
||||
|
||||
`node scripts/chat-upload-key.mjs create <name> [max_mb]`
|
||||
`node scripts/chat-upload-key.mjs list`
|
||||
`node scripts/chat-upload-key.mjs revoke <id>`
|
||||
|
||||
Upload (raw body, returns JSON with `url` and `delete_token`):
|
||||
|
||||
```bash
|
||||
curl -X POST https://your.host/api/chat/upload \
|
||||
-H "X-API-Key: cu_..." -H "X-Filename: clip.webm" -H "X-Upload-Expiry: 7d" \
|
||||
--data-binary @clip.webm
|
||||
```
|
||||
|
||||
Delete: `curl -X DELETE https://your.host/api/chat/upload/<slug> -H "X-Delete-Token: ..."`
|
||||
|
||||
Files are served at `/cu/<slug>/<name>` with Range support. Only sniffed images, video and audio are served inline; anything else is forced to download.
|
||||
|
||||
Reference in New Issue
Block a user