---
title: "Upload media for posts"
method: POST
path: "/api/media/upload"
tags: ["Media"]
---

# Upload media for posts

`POST /api/media/upload`

## Request

- Base URL: `https://www.fuxux.com`
- URL: `https://www.fuxux.com/api/media/upload`
- Auth: none declared

Multipart form field `file`. Fuxux allows up to **50 MB**, but the hosting platform hard-caps any single request body at **~4.5 MB** — larger files fail here regardless of the 50 MB limit; host them yourself and pass a public HTTPS URL in `media_urls` instead. Allowed types: JPEG, PNG, GIF, WebP, MP4, MOV, WebM.

## Response `200`

Public URL

- object
  - `url` string, uri, required
  - `path` string, required

## Other responses

- `400`: Missing file or disallowed type/size
- `401`: Unauthorized
- `500`: Upload failed

---

[API](https://skmtc.dev/fuxux/apis/fuxux-api.md) · [All operations](https://skmtc.dev/fuxux/apis/fuxux-api/llms.txt) · [OpenAPI document](https://skmtc.dev/fuxux/apis/fuxux-api/revisions/e70e5940182d?raw)
