mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-13 16:16:46 +08:00
feat(core): support normal attachments (#13112)
fix AF-2722  #### PR Dependency Tree * **PR #13112** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Expanded comment editor attachment support to include any file type, not just images. * Added file preview and download functionality for non-image attachments. * Introduced notifications for attachment upload failures and downloads. * Added a new AI artifact tool component for enhanced AI tool integrations. * **Style** * Added new styles for generic file previews, including icons, file info, and delete button. * **Bug Fixes** * Improved error handling and user feedback for attachment uploads. * **Refactor** * Unified attachment UI rendering and handling for both images and other file types. * **Chores** * Removed obsolete editor state attribute from comment preview sidebar. <!-- end of auto-generated comment: release notes by coderabbit.ai --> #### PR Dependency Tree * **PR #13112** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal)
This commit is contained in:
@@ -351,6 +351,7 @@ export class DocCommentEntity extends Entity<{
|
||||
url,
|
||||
filename: file.name,
|
||||
mimeType: file.type,
|
||||
size: file.size,
|
||||
});
|
||||
|
||||
if (isPendingComment) {
|
||||
|
||||
@@ -13,6 +13,7 @@ export type CommentAttachment = {
|
||||
url?: string; // attachment may not be uploaded yet
|
||||
filename?: string;
|
||||
mimeType?: string;
|
||||
size?: number; // in bytes
|
||||
};
|
||||
|
||||
export interface BaseComment {
|
||||
|
||||
Reference in New Issue
Block a user