fix(docparser): preserve standalone image uploads from icon filter

When the uploaded file is itself an image, the image reference now carries
an IsOriginal flag so ResolveAndStore skips the small-icon size filter.
Otherwise small standalone images (e.g. avatars below 64x64) were silently
dropped before reaching multimodal OCR/caption processing.
This commit is contained in:
wizardchen
2026-04-29 11:11:54 +08:00
committed by lyingbug
parent 535aec87e3
commit d55b52652c
3 changed files with 12 additions and 2 deletions
+5
View File
@@ -31,6 +31,11 @@ type ImageRef struct {
MimeType string
StorageKey string
ImageData []byte // inline image bytes (universal fallback for cross-machine deployments)
// IsOriginal marks references that point to the originally uploaded file
// itself (e.g. when the user uploads a standalone image). Such references
// must not be dropped by the icon/size filter — otherwise a small image
// upload would be silently discarded before multimodal processing.
IsOriginal bool
}
// ParserEngineInfo describes a registered parser engine.