upload_media
Upload media to Posterly storage and get a reusable URL for create_post; supports local files, base64 chat images, and public HTTPS URLs.
Instructions
Upload an image or video to posterly storage and get a URL for create_post. Supports JPEG, PNG, GIF, WebP, MP4, MOV, WebM (PDFs are not accepted here: use create_signed_upload or create_media_drop). Images up to 10MB, videos up to 50MB. Three ways in: file_path (an explicit local path the user gave you), base64_data with filename (PREFERRED for images shared in chat, which are not on the local filesystem), or url (a public HTTPS image or video; local/private network URLs are blocked).
This writes to the user's media storage (counts against quota) but does NOT publish the file anywhere. Uploading is safe - it's the subsequent create_post call that publishes content, and that tool has its own confirmation requirements. Never guess file paths. You can also pass public HTTP(S) media URLs directly to create_post/update_post; use url here when you want to upload once and reuse the returned posterly URL. Pass asset_id (from list_media) to delete that library file: the first request previews it and deletes nothing; send it again with confirm true and that preview_id only after the user agrees. A file a post still uses is kept.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public HTTPS URL for the image or video to copy into posterly storage. Local/private network URLs are blocked. | |
| confirm | No | Delete only. True only after the user explicitly approves the preview, together with preview_id. | |
| asset_id | No | Library file id from list_media. Deletes that file after a preview. Do not combine with url, file_path, or base64_data. | |
| filename | No | Filename with extension (e.g. photo.jpg, video.mp4). Required with file_path or base64_data; optional override with url. | |
| file_path | No | Absolute local filesystem path (e.g. /Users/name/photo.jpg). Only use when the user gives you an explicit path. Do NOT guess paths for images uploaded in chat. | |
| preview_id | No | The preview_id from the delete preview. Required with confirm: true. | |
| base64_data | No | Base64-encoded file data. PREFERRED for images shared directly in chat - extract the image data as base64 and pass it here. | |
| content_type | No | MIME type (auto-detected from filename if omitted) | |
| workspace_id | No | Optional. The workspace this acts in and whose plan pays (from whoami). Needed only when your connection can act in several workspaces. |