Session Information
Loading session data...
Upload a file
POST /api/profile/upload — accepts multipart/form-data.
Pick a PNG, JPG, or PDF up to 5 MB. The server buffers the file to validate
size + content-type and compute a SHA-256, then discards the bytes.
Only metadata (filename, size, checksum, upload token) is persisted to
profile_uploads. This is a demo endpoint — no R2/object storage is used.
Endpoint reference
Content-Type: multipart/form-data
Required form fields:
file, session_token, user_id,
session_id, csrf_token, correlation_id
Optional form field: kind (avatar or attachment)
Example via curl (after logging in through /login to obtain the tokens):
curl -X POST https://public.loadmagic.ai/api/profile/upload \ -F "file=@./avatar.png;type=image/png" \ -F "kind=avatar" \ -F "session_token=tok_..." \ -F "user_id=1" \ -F "session_id=sess_..." \ -F "csrf_token=tok_..." \ -F "correlation_id=tok_..."