feat: Add file attachments and inline image uploads to comments and card descriptions#482
Open
flrxnt wants to merge 4 commits into
Open
feat: Add file attachments and inline image uploads to comments and card descriptions#482flrxnt wants to merge 4 commits into
flrxnt wants to merge 4 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
FileAttachmentNode. Both are uploaded via a newuploadFilehelper 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]@tiptap/extension-image) to handle inline images. (apps/web/package.json,pnpm-lock.yaml) [1] [2]cardPublicIdandonFileUploadcallbacks, 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:
/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:
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.