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.pngThe response includes the media item's ID and hosted URL. Use that URL in the post.
The two steps
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>"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 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 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 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:linkThe 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>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.