Skip to content

feat: Add file attachments and inline image uploads to comments and card descriptions#482

Open
flrxnt wants to merge 4 commits into
kanbn:mainfrom
flrxnt:feat/media-uploads-with-past
Open

feat: Add file attachments and inline image uploads to comments and card descriptions#482
flrxnt wants to merge 4 commits into
kanbn:mainfrom
flrxnt:feat/media-uploads-with-past

Conversation

@flrxnt

@flrxnt flrxnt commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

This pull request adds support for file and image uploads directly within the rich text editor, allowing users to drag-and-drop or paste files into comments and card descriptions. It introduces a new custom file attachment node for non-image files, integrates image handling via Tiptap's image extension, and implements a secure API endpoint for serving uploaded files. The changes also ensure that the UI updates appropriately after uploads.

Closes #377

Editor and File Upload Enhancements:

  • Added support for pasting and dragging files (images and other files) into the editor. Images are rendered inline, while other files are shown as download links using a new custom FileAttachmentNode. Both are uploaded via a new uploadFile helper and the UI is refreshed after upload. (apps/web/src/components/Editor.tsx, apps/web/src/components/FileAttachment/FileAttachmentNode.tsx, apps/web/src/components/FileAttachment/FileAttachmentNodeView.tsx) [1] [2] [3] [4] [5]
  • Integrated the Tiptap image extension (@tiptap/extension-image) to handle inline images. (apps/web/package.json, pnpm-lock.yaml) [1] [2]
  • Updated editor props and usage to accept cardPublicId and onFileUpload callbacks, ensuring the correct card is associated with uploads and the UI is invalidated after changes. (apps/web/src/components/Editor.tsx, apps/web/src/views/card/index.tsx, apps/web/src/views/card/components/Comment.tsx, apps/web/src/views/card/components/NewCommentForm.tsx) [1] [2] [3] [4] [5]

Backend / API:

  • Added a new authenticated, rate-limited API endpoint (/api/media/[attachmentPublicId]) to securely serve uploaded attachments, with permission checks and S3 URL generation. (apps/web/src/pages/api/media/[attachmentPublicId].ts) (apps/web/src/pages/api/media/[attachmentPublicId].tsR1-R66)

UI Improvements:

  • Added custom styling for images and file attachments in the editor for a consistent and user-friendly appearance. (apps/web/src/components/Editor.tsx, apps/web/src/components/FileAttachment/FileAttachmentNodeView.tsx) [1] [2]

These changes together provide a seamless and secure file upload experience in the editor, supporting both images and other file types, with immediate feedback and proper permissions handling.

@flrxnt flrxnt changed the title Feat/media uploads with past Add file attachments and inline image uploads to comments and card descriptions Apr 29, 2026
@flrxnt flrxnt changed the title Add file attachments and inline image uploads to comments and card descriptions feat: Add file attachments and inline image uploads to comments and card descriptions Apr 29, 2026
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.

[FEAT] Allow pasting of copied binary data (pdfs, images) to be auto-linked in comments

1 participant