mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-25 19:15:18 +02:00
feat: implement background processing for binary attachments in Obsidian plugin
- Added a new Celery task for indexing non-markdown attachments. - Enhanced the Obsidian plugin schema to support binary attachments. - Updated routes to enqueue binary attachments for background processing. - Improved metadata handling for binary attachments during indexing. - Added tests for binary attachment processing and validation.
This commit is contained in:
parent
5047527b47
commit
6ac5256431
11 changed files with 519 additions and 68 deletions
|
|
@ -52,6 +52,24 @@ class NotePayload(_PluginBase):
|
|||
content_hash: str = Field(
|
||||
..., description="Plugin-computed SHA-256 of the raw content"
|
||||
)
|
||||
is_binary: bool = Field(
|
||||
default=False,
|
||||
description=(
|
||||
"True when payload represents a non-markdown attachment. "
|
||||
"If set, the plugin may include binary_base64 for ETL extraction."
|
||||
),
|
||||
)
|
||||
binary_base64: str | None = Field(
|
||||
default=None,
|
||||
description=(
|
||||
"Base64-encoded raw file bytes for binary attachments. "
|
||||
"Used by the backend ETL pipeline."
|
||||
),
|
||||
)
|
||||
mime_type: str | None = Field(
|
||||
default=None,
|
||||
description="Optional MIME type hint for binary attachments.",
|
||||
)
|
||||
size: int | None = Field(
|
||||
default=None,
|
||||
ge=0,
|
||||
|
|
@ -138,7 +156,7 @@ class HealthResponse(_PluginBase):
|
|||
|
||||
class SyncAckItem(_PluginBase):
|
||||
path: str
|
||||
status: Literal["ok", "error"]
|
||||
status: Literal["ok", "queued", "error"]
|
||||
document_id: int | None = None
|
||||
error: str | None = None
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue