fix chat and thumbnail bug (#2803)
### What problem does this PR solve? 1. fix white screen issue when chat response 2. thumbnail bug when document not support ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) - [ ] New Feature (non-breaking change which adds functionality) - [ ] Documentation Update - [ ] Refactoring - [ ] Performance Improvement - [ ] Other (please describe): --------- Co-authored-by: chongchuanbing <chongchuanbing@gmail.com>
This commit is contained in:
@@ -358,8 +358,10 @@ class FileService(CommonService):
|
||||
doc_id = get_uuid()
|
||||
|
||||
img = thumbnail_img(filename, blob)
|
||||
thumbnail_location = f'thumbnail_{doc_id}.png'
|
||||
STORAGE_IMPL.put(kb.id, thumbnail_location, img)
|
||||
thumbnail_location = ''
|
||||
if img is not None:
|
||||
thumbnail_location = f'thumbnail_{doc_id}.png'
|
||||
STORAGE_IMPL.put(kb.id, thumbnail_location, img)
|
||||
|
||||
doc = {
|
||||
"id": doc_id,
|
||||
|
||||
Reference in New Issue
Block a user