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
--spritebooleanAttach a PNG sprite sheet of up to 10 MiB as a sprite, to anything but a doc or image setting. Requires --frame-width, --frame-height, and --frames, and the frame grid must cover the whole sheet. Animated sheets play in the sprite viewer.
--sprite-datastringAttach a PNG as a sprite, with frames from Aseprite's JSON export (Sheet type By rows or a strip, untrimmed) or a spriteSheetData JSON file
--frame-widthnumberSprite frame width in pixels
--frame-heightnumberSprite frame height in pixels
--framesnumberNumber of sprite frames, read left to right, then top to bottom
--columnsnumberSprite sheet columns; defaults to the sheet width divided by the frame width
--rowsnumberSprite sheet rows; defaults to the sheet height divided by the frame height
--durationsstringComma-separated milliseconds per frame, one per frame, such as 55,55,110
--fpsnumberSprite framerate; defaults to the mean of --durations, or 12
--animationstringNamed animation over 0-based frames, such as walk:0-7; repeat the flag for more
--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 lottie
pf media upload walk.png --post post123 --sprite --frame-width 32 --frame-height 32 --frames 8 --durations 100,100,100,100,100,100,100,150
pf media upload walk.png --task task456 --sprite-data walk.jsonpf 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 update <id>Make a post image you wrote a sprite, change its frames, or turn it back into a plain image. The grid is checked against the image's recorded size. Sprites published from Aseprite with an atlas cannot be changed here.
Options
--spritebooleanSet sprite frames from the frame flags
--sprite-datastringSet sprite frames from Aseprite's JSON export or a spriteSheetData JSON file
--clear-spritebooleanTurn the sprite back into a plain image
--frame-widthnumberSprite frame width in pixels
--frame-heightnumberSprite frame height in pixels
--framesnumberNumber of sprite frames, read left to right, then top to bottom
--columnsnumberSprite sheet columns; defaults to the image width divided by the frame width
--rowsnumberSprite sheet rows; defaults to the image height divided by the frame height
--durationsstringComma-separated milliseconds per frame, one per frame
--fpsnumberSprite framerate; defaults to the mean of --durations, or 12
--animationstringNamed animation over 0-based frames, such as walk:0-7; repeat the flag for more
Example
pf media update media123 --sprite --frame-width 32 --frame-height 32 --frames 8 --durations 55,55,55,55,55,55,55,110
pf media update media123 --sprite-data walk.json
pf media update media123 --clear-spritepf 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.