Skip to content

feat: add attachment upload command#59

Open
hieptuanle wants to merge 1 commit into
Doist:mainfrom
hieptuanle:feat/attachment-upload
Open

feat: add attachment upload command#59
hieptuanle wants to merge 1 commit into
Doist:mainfrom
hieptuanle:feat/attachment-upload

Conversation

@hieptuanle
Copy link
Copy Markdown

@hieptuanle hieptuanle commented Apr 7, 2026

Hi! I really like the project. But for now I cannot upload the images inside the markdown files as attachments. With this PR, I hope that this issue will be resolved.

Summary

  • Add ol attachment create (alias ol att create) command for uploading file attachments to Outline documents
  • Implement two-step presigned URL upload flow: POST metadata to attachments.create API, then upload file to the returned presigned URL
  • Add apiUpload() function to the API layer for multipart file uploads
  • Auto-detect content type from file extension (png, jpg, gif, svg, webp, pdf, zip)
  • Update SKILL.md with attachment command documentation

Usage

# Upload an image to a document
ol att create ./screenshot.png --document <doc-id>

# With explicit content type and JSON output
ol att create ./file.pdf --document <doc-id> --content-type "application/pdf" --json

Test plan

  • npm run build passes
  • npm run lint:check passes
  • npm run format:check passes
  • npm test — 143 tests pass
  • Manual test: uploaded image to Outline document, verified image renders correctly

🤖 Generated with Claude Code

Add `ol attachment create` (alias `ol att create`) for uploading file
attachments to Outline documents via the two-step presigned URL flow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant