Загрузка текстов
URL: https://tmps.site/upload_text
Content-Type: multipart/form-data
Параметры
Успешный ответ
{
"success": true,
"data": {
"id": "xyz7",
"preview_url": "https://tmps.site/t/xyz7",
"raw_url": "https://tmps.site/raw_text/xyz7?password=123",
"expiresAt": "2026-02-05T12:34:56.789Z"
}
}
Коды ошибок
Примеры запросов
cURL
echo "Hello" > temp.txt
curl -X POST https://tmps.site/upload_text -F "file=@temp.txt"
Python
import requests
from io import BytesIO
text_file = BytesIO(b"Hello")
text_file.name = "note.txt"
response = requests.post(
"https://tmps.site/upload_text",
files={"file": text_file}
)
print(response.json())