---
title: "Médiafeltöltés a parancssorból | Posty dokumentáció"
description: "Fájl feltöltése, és hogyan kerül a visszakapott cím a bejegyzésbe."
canonical: https://posty.hu/en/docs/cli/upload
source: https://posty.hu/en/docs/cli/upload.md
---

Parancssor (CLI)

# Médiafeltöltés a parancssorból

Fájl feltöltése, és hogyan kerül a visszakapott cím a bejegyzésbe.

## posty upload

```
posty upload ./kep.png
```

Kód másolása

The response includes the media item's ID and hosted URL. Use that URL in the post.

## The two steps

The -m flag doesn't accept a local file

`posts:create -m` expects the URL of a file in the media library, not a local path or just any URL from the internet. Upload the file first, then pass the returned `.path` value.

```
PATH_URL=$(posty upload ./kep.png | jq -r '.path')

posty posts:create \
  -c "Sziasztok!" \
  -m "$PATH_URL" \
  -s "2026-12-31T12:00:00Z" \
  -i "<csatorna-azonosito>"
```

Kód másolása

For multiple images in one part, separate their URLs with commas. The `-m` flag always applies to the preceding `-c` flag. See the [Managing posts](https://posty.hu/en/docs/cli/posts) page.

## Formats and sizes

- **Image:** JPEG, PNG, GIF, WEBP, AVIF, BMP, TIFF, up to 10 MB.
- **Video:** MP4, up to 1 GB.
- Platforms may have stricter requirements for aspect ratio, resolution, or video length. If a platform rejects the file, its error message will appear on the post. See the [Upload and media](https://posty.hu/en/docs/troubleshooting/upload) page.

## Uploading the same file more than once

The server deduplicates files with identical content. A daily script that uploads the same image does not create another row or stored object, so you don't have to keep track of what you've already uploaded.

You can also import a file directly from a public URL through the API. See the [Import media from a URL](https://posty.hu/en/docs/api/endpoints/media-url) endpoint.

## If the file isn't on your computer

`posty upload` uploads a file from disk. If the image or video is on your phone, or you're working with an agent that can't access the file system, request an upload link:

```
posty upload:link
```

Kód másolása

The `url` in the response opens a page in your browser. Open it anywhere, even without signing in. Drop the files onto the page, then check which ones were uploaded:

```
posty upload:files <id>
```

Kód másolása

Use each returned item's `path` with the `posts:create -m` flag. The link is valid for two hours, accepts multiple files, and only allows uploads to the workspace it was created for. For MCP, use the `create_upload_link` and `list_upload_link_files` tools.

Documentation pages

Is something missing from this page? Email [norbert@posty.hu](mailto:norbert@posty.hu) or use the form on the [Help](https://posty.hu/en/help) page.
