feat(server): add comment-attachment storage (#12911)

close CLOUD-230












#### PR Dependency Tree


* **PR #12911** 👈
  * **PR #12761**
    * **PR #12924**
      * **PR #12925**

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**
* Added support for uploading and retrieving comment attachments in
workspace documents via a new API endpoint.
* Introduced a service for managing comment attachments, including
storage, retrieval, deletion, and URL generation.
* Implemented localized error messages and improved error handling for
missing comment attachments.

* **Bug Fixes**
  * Improved error feedback when comment attachments are not found.

* **Tests**
* Added comprehensive tests for comment attachment storage, retrieval,
deletion, API endpoint behavior, and permission checks.

* **Documentation**
* Updated GraphQL schema and localization files to include new error
types for comment attachments.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
fengmk2
2025-07-01 15:04:52 +08:00
committed by GitHub
parent 6e034185cf
commit e8bc8f2d63
12 changed files with 456 additions and 7 deletions
+4
View File
@@ -8891,6 +8891,10 @@ export function useAFFiNEI18N(): {
* `Reply not found.`
*/
["error.REPLY_NOT_FOUND"](): string;
/**
* `Comment attachment not found.`
*/
["error.COMMENT_ATTACHMENT_NOT_FOUND"](): string;
} { const { t } = useTranslation(); return useMemo(() => createProxy((key) => t.bind(null, key)), [t]); }
function createComponent(i18nKey: string) {
return (props) => createElement(Trans, { i18nKey, shouldUnescape: true, ...props });
+2 -1
View File
@@ -2195,5 +2195,6 @@
"error.INVALID_SEARCH_PROVIDER_REQUEST": "Invalid request argument to search provider: {{reason}}",
"error.INVALID_INDEXER_INPUT": "Invalid indexer input: {{reason}}",
"error.COMMENT_NOT_FOUND": "Comment not found.",
"error.REPLY_NOT_FOUND": "Reply not found."
"error.REPLY_NOT_FOUND": "Reply not found.",
"error.COMMENT_ATTACHMENT_NOT_FOUND": "Comment attachment not found."
}