优化导入本地TXT文本文件后文档名包含点号的问题

This commit is contained in:
zmister 2022-08-04 15:06:21 +08:00
parent de0c8cba09
commit d9a8ee09bb

View File

@ -182,7 +182,7 @@ class ImportLocalDoc(APIView):
else:
doc_content_html = None
doc = Doc.objects.create(
name = html_filter(file_name[:-3]),
name = html_filter('.'.join(file_name.split('.')[:-1])),
pre_content = doc_content,
content = doc_content_html,
top_doc = project,