Files
Upload files and inspect media records from the CLI.
Upload, list, view, and delete file attachments. Alias: pf m
pf media listList media attachments. Filter by exactly one parent type. If no id filter is set, defaults to listing post attachments.
alias: pf m ls
Options
--poststringFilter by post ID
--commentstringFilter by comment ID
--taskstringFilter by task ID
--task-commentstringFilter by task-comment ID
--targetstringOverride target kind: post | comment | task | taskComment
--typestringFilter by file type: image, video, audio, model, animation, sprite, document, lottie, or file
--projectstringPost media only: files on posts in this project
--uploaderstringPost media only: files uploaded by this user ID, or me
--created-afterstringPost media only: uploaded after this time, as an ISO 8601 time with a timezone or Unix milliseconds. Also --created-before
--querystringPost media only: words in the file name
--sort / --orderstringPost media only: sort by createdAt or fileSize, and order asc or desc
--limitnumberMax number of results
--cursorstringCursor for pagination
Example
pf media list --task task123
pf media list --comment com123 --type image
pf media list --target task --limit 20
pf media list --uploader me --sort fileSize --order descpf media statsCount the files you can see on posts, by kind
Options
--projectstringOnly files in this project (ID or slug)
Example
pf media stats --project websitepf media posts <id>List the posts a post file appears on
Example
pf media posts att_abc123pf media reorder <post> <ids...>Set the order of a post's files. List every file ID on the post, first to last. Only the post's author can reorder.
Example
pf media reorder 3 att_def456 att_abc123pf media pair <post> <before> <after>Show two images or GIFs on a post as one before/after with a divider to drag. Either file leaves any pair it was in. Only the post's author can pair files.
Options
--before-labelstringLabel for the before side, up to 40 characters (default Before)
--after-labelstringLabel for the after side, up to 40 characters (default After)
Example
pf media pair 3 att_abc123 att_def456 --before-label Day --after-label Nightpf media unpair <post> <id>Split a before/after pair back into two files. Pass either file in the pair. Only the post's author can unpair files.
Example
pf media unpair 3 att_abc123pf media retry-conversion <id>Queue a failed 3D model conversion again
Options
--targetstringTarget kind: post | comment | task | taskComment (default post)
Example
pf media retry-conversion att_abc123pf media cancel-uploadCancel an unattached upload and release its storage reservation. Provider deletion runs in the background. Safe to retry with an expired token. Already attached uploads return a conflict; retry a finalization conflict after it finishes.
Options
--upload-tokenstringrequiredToken returned when the upload was prepared.
Example
pf media cancel-upload --upload-token "$UPLOAD_TOKEN"pf media upload <file>Upload images, videos, or other files to posts, tasks, comments, Chat, Canvas, or inline Docs. Image settings include avatars, logos, project images, and custom reactions. Exactly one destination flag is required. Uses the same format and size limits as the app, up to 1 GiB. A GIF or WebP animation too large to process is stored as the original file, without resized versions.
alias: pf m upload
Options
--chat-messagestringChat or portal discussion message ID; requires chat:write
--canvasstringCanvas ID; requires canvas:write
--xstringCanvas x coordinate; default 0
--ystringCanvas y coordinate; default 0
--widthstringCanvas item width; default 400
--heightstringCanvas item height; default 300
--framestringParent canvas frame ID
--avatarstringYour user ID; requires profile:write
--workspace-logostringWorkspace ID; requires owner or admin
--project-headerstringProject ID; requires projects:write and project settings access
--project-iconstringProject ID; requires projects:write and project settings access
--portal-logostringPortal ID; requires owner or admin
--portal-bannerstringPublic portal ID; requires owner or admin
--custom-reactionstringWorkspace ID; requires reactions:write and owner or admin
--namestringCustom reaction name; 2-32 letters, numbers, or underscores
--docstringDoc ID for a native inline file embed; requires docs:write and media:write
--after-blockstringInsert after a top-level Doc block ID; defaults to the end of the Doc
--resume-statestringSave progress to this file. Rerun the same command to resume before the upload expires. The file contains signed URLs; keep it private.
--media-typestringFor JSON files: lottie for animation or file for ordinary data
--poststringPost ID to attach media to
--commentstringComment ID to attach media to
--taskstringTask ID to attach media to
--task-commentstringTask-comment ID to attach media to
--targetstringExplicit target kind; must match the id flag when both are set
Example
pf media upload review.mp4 --post post123 --resume-state ./review-upload.json
pf media upload model.glb --task task456
pf media upload review.mp4 --chat-message message123
pf media upload reference.png --canvas canvas123 --x 200 --y 100
pf media upload diagram.png --doc page123 --after-block block456
pf media upload animation.json --comment com789 --media-type lottiepf media view <id>View media details. Pass --target for non-post attachments (defaults to post).
alias: pf m show
Options
--targetstringTarget kind: post | comment | task | taskComment (default: post)
Example
pf media view media123
pf media view media123 --target taskpf media delete <id>Delete a media attachment. Pass --target for non-post attachments (defaults to post).
alias: pf m rm
Options
--targetstringTarget kind: post | comment | task | taskComment (default: post)
--confirmbooleanSkip confirmation prompt
--dry-runbooleanPreview without deleting
Example
pf media delete media123 --confirm
pf media delete media456 --target comment --confirmFix file problems
- Media attaches to the wrong kind of record
- Use exactly one of --post, --comment, --task, or --task-comment. When using --target, make it match the parent ID flag and repeat the same target when viewing or deleting.
- An upload fails partway through
- Check the file and parent record still exist, keep the same target, and retry once. List the parent's media before retrying to avoid a duplicate attachment after an ambiguous response.