mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 10:12:51 +00:00
refactor: allow loading of truncated images and increase max pixel limit in common_handle.py
--bug=1057749 --user=刘瑞斌 【知识库】qa问答对文档中带图片,导入后图片未显示 https://www.tapd.cn/62980211/s/1723700
This commit is contained in:
parent
d7b4f90798
commit
cb40d62162
|
|
@ -22,6 +22,9 @@ from openpyxl.xml.constants import SHEET_DRAWING_NS, REL_NS, SHEET_MAIN_NS
|
|||
from common.utils.logger import maxkb_logger
|
||||
from knowledge.models import File
|
||||
|
||||
from PIL import ImageFile
|
||||
ImageFile.LOAD_TRUNCATED_IMAGES = True
|
||||
PILImage.MAX_IMAGE_PIXELS = None
|
||||
|
||||
def parse_element(element) -> {}:
|
||||
data = {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue