> ## Documentation Index
> Fetch the complete documentation index at: https://docs.postqueen.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Uploads & Media

> Payload limits, video failures and cancel-in-flight behavior

Find your symptom and open it. If you are hitting a size limit, read the first box before anything
else: the number that catches people is not the one they expect.

<Warning>
  **`POST /public/v1/posts` accepts about 100 kB, not 50 MB.** The 50 MB body limit is mounted on
  `/posts` and `/copilot/*`, which are the internal routes the web interface uses. The public API path
  is neither, so it falls back to the framework default, and a single inlined image clears it.

  Upload the file first and reference the returned `path`.
</Warning>

<AccordionGroup>
  <Accordion title="PayloadTooLargeError when creating a post" icon="weight-hanging">
    You inlined image data instead of uploading first. Upload through `/public/v1/upload` or
    `/public/v1/upload-from-url`, then pass the returned `id` and `path` in the post body's `image`
    array.

    ```bash theme={"system"}
    # 1. upload the file
    curl -X POST "https://api.postqueen.ai/public/v1/upload" \
      -H "Authorization: your-api-key" \
      -F "file=@photo.jpg"

    # 2. pass the returned id and path into the post
    ```
  </Accordion>

  <Accordion title="The file type was refused" icon="file-circle-xmark">
    `/public/v1/upload` checks the file's **detected** MIME type against this list:

    | Type      | MIME         |
    | --------- | ------------ |
    | JPEG      | `image/jpeg` |
    | PNG       | `image/png`  |
    | GIF       | `image/gif`  |
    | WebP      | `image/webp` |
    | AVIF      | `image/avif` |
    | BMP       | `image/bmp`  |
    | TIFF      | `image/tiff` |
    | MP4 video | `video/mp4`  |

    `/public/v1/upload-from-url` applies the same list to the bytes it downloads, but checks the URL
    first: the path, ignoring any query string, must end in `.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`
    or `.mp4`.

    **So AVIF, BMP and TIFF cannot be fetched from a URL at all**, only sent through the multipart
    endpoint. A `400` naming extensions rather than MIME types is how you tell the two checks apart.

    PDFs are not accepted. The only PDF flow is LinkedIn document carousels, produced internally by
    converting an image carousel.
  </Accordion>

  <Accordion title="File size exceeds the maximum allowed size" icon="gauge-high">
    Per-file caps, on both endpoints:

    |        |           |
    | ------ | --------- |
    | Images | **10 MB** |
    | Video  | **1 GB**  |
  </Accordion>

  <Accordion title="upload-from-url times out, or fetch failed" icon="link-slash">
    The backend proxies the source URL, so it fails when the source is slow, unreachable, blocks the
    user agent, or sits behind authentication.

    * The source must be publicly reachable HTTPS with no auth
    * Not private S3 URLs, expired signed URLs, or intranet hosts
    * Consistently slow source? Download it and use the multipart `/upload` endpoint
  </Accordion>

  <Accordion title="Failed to load video metadata" icon="film">
    She inspects duration, dimensions and codec before handing the file to the network, and files
    outside the supported range fail here.

    |             |                                                                      |
    | ----------- | -------------------------------------------------------------------- |
    | Container   | MP4                                                                  |
    | Video codec | H.264, baseline or main profile                                      |
    | Audio codec | AAC                                                                  |
    | Frame rate  | 30 fps or less                                                       |
    | Resolution  | up to 1920×1080. TikTok and YouTube Shorts prefer portrait 1080×1920 |

    Other formats may upload and then be rejected by the network downstream.
  </Accordion>

  <Accordion title="Uploader plugin does not allow removing files during an upload" icon="ban">
    You pressed Cancel on a file already in flight, and the uploader does not support that. Wait for
    it to finish, then delete the asset from the post.

    A known limitation, tracked in [Known Issues](/troubleshooting/known-issues).
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Uploads and storage" icon="cloud-arrow-up" href="/configuration/uploads">
    Where files are kept, and how they are served to the networks
  </Card>

  <Card title="Upload over the API" icon="code" href="/public-api/uploads/upload-file">
    The endpoint, its fields and its responses
  </Card>

  <Card title="Media and design" icon="image" href="/using/media-and-design">
    The library, the design editor and AI generation
  </Card>

  <Card title="Still stuck?" icon="headset" href="/support">
    What to put in a report so the first reply is the useful one
  </Card>
</CardGroup>
