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:
@@ -98,6 +98,7 @@ func imageToResult(fileName string, data []byte) *types.ReadResult {
|
||||
OriginalRef: safeRef,
|
||||
MimeType: mime,
|
||||
ImageData: data,
|
||||
IsOriginal: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -170,6 +171,7 @@ func ensureOriginalImageRef(req *types.ReadRequest, mdContent string, imageRefs
|
||||
OriginalRef: refPath,
|
||||
MimeType: mime,
|
||||
ImageData: req.FileContent,
|
||||
IsOriginal: true,
|
||||
})
|
||||
|
||||
return mdContent, imageRefs
|
||||
|
||||
Reference in New Issue
Block a user