Uploads
Store attachments and get an address back (multipart).
/api/v1/uploadsUpload one or more original files as multipart/form-data. The response returns an ID and metadata for each file; use those IDs in a chat message's attachment_ids.
All file types are accepted, including text, ZIP, documents and unknown MIME types. An active session is required through X-Session-Id; the bundled frontend forwards it automatically.
Form fields
filesfile[] · multipartrequiredOne or more files, at most UPLOADS_MAX_FILES per request, each within UPLOADS_MAX_BYTES.
Example request
curl -X POST http://localhost:8000/api/v1/uploads \
-H "X-Session-Id: $SMEEWARE_SESSION" \
-F "files=@project.zip"Response
{
"files": [
{
"id": "a904577a208845c98dbce47c1d4655f5",
"filename": "project.zip",
"media_type": "application/zip",
"bytes": 245113,
"path": "/srv/smeeware/data/uploads/a904577a208845c98dbce47c1d4655f5.zip"
}
]
}The filename is kept for display and downloads. Disk names use generated IDs. path describes the backend location; chat requests use the ID rather than a caller-supplied filesystem path.
201Stored.
401No active session.
413File too large: code file_too_large, details { max_bytes, filename }.
422Empty file, invalid form or too many files. too_many_files includes details.max_files.
500Uploads are disabled (UPLOADS_ENABLED=false).