diff --git a/apps/common/handle/base_parse_table_handle.py b/apps/common/handle/base_parse_table_handle.py index b84690859..65eaf897f 100644 --- a/apps/common/handle/base_parse_table_handle.py +++ b/apps/common/handle/base_parse_table_handle.py @@ -19,5 +19,5 @@ class BaseParseTableHandle(ABC): pass @abstractmethod - def get_content(self, file): + def get_content(self, file, save_image): pass \ No newline at end of file diff --git a/apps/common/handle/impl/table/csv_parse_table_handle.py b/apps/common/handle/impl/table/csv_parse_table_handle.py index dcd971839..e2fc7ce86 100644 --- a/apps/common/handle/impl/table/csv_parse_table_handle.py +++ b/apps/common/handle/impl/table/csv_parse_table_handle.py @@ -35,7 +35,7 @@ class CsvSplitHandle(BaseParseTableHandle): return [{'name': file.name, 'paragraphs': paragraphs}] - def get_content(self, file): + def get_content(self, file, save_image): buffer = file.read() try: return buffer.decode(detect(buffer)['encoding']) diff --git a/apps/common/handle/impl/table/xls_parse_table_handle.py b/apps/common/handle/impl/table/xls_parse_table_handle.py index 0fee4e35b..5b7f594a1 100644 --- a/apps/common/handle/impl/table/xls_parse_table_handle.py +++ b/apps/common/handle/impl/table/xls_parse_table_handle.py @@ -61,7 +61,7 @@ class XlsSplitHandle(BaseParseTableHandle): return [{'name': file.name, 'paragraphs': []}] return result - def get_content(self, file): + def get_content(self, file, save_image): # 打开 .xls 文件 try: workbook = xlrd.open_workbook(file_contents=file.read(), formatting_info=True) diff --git a/apps/common/handle/impl/table/xlsx_parse_table_handle.py b/apps/common/handle/impl/table/xlsx_parse_table_handle.py index 3fd40b2d1..2ae22d019 100644 --- a/apps/common/handle/impl/table/xlsx_parse_table_handle.py +++ b/apps/common/handle/impl/table/xlsx_parse_table_handle.py @@ -74,7 +74,7 @@ class XlsxSplitHandle(BaseParseTableHandle): return result - def get_content(self, file): + def get_content(self, file, save_image): try: # 加载 Excel 文件 workbook = load_workbook(file)