File Uploads

LaunchKit supports file uploads for user avatars and organization logos. Files are validated, processed, and stored on the configured media disk.

Upload Avatar

POST /api/user/avatar

Upload or replace the authenticated user's avatar image.

  • Field name: avatar
  • Accepted formats: jpg, jpeg, png, gif, webp, svg
  • Max file size: 2 MB
curl -X POST /api/user/avatar \
  -H "Authorization: Bearer {token}" \
  -F "avatar=@photo.jpg"

The previous avatar is automatically deleted when a new one is uploaded.

Upload Organization Logo

POST /api/organizations/{org}/logo

Upload or replace an organization's logo. Only organization admins and owners can upload logos.

  • Field name: logo
  • Accepted formats: jpg, jpeg, png, gif, webp, svg
  • Max file size: 2 MB

Storage Location

All uploaded files are stored on the mediaDisk, which is configurable via the admin panel. The media disk maps to the active storage driver (S3, R2, or local). Files are organized by type and ID to prevent naming collisions:

  • Avatars: avatars/{user_id}/{filename}
  • Logos: logos/{organization_id}/{filename}