mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-26 11:59:32 +00:00
fix:solve upload file bug
solve upload file bug
This commit is contained in:
parent
9131fd574c
commit
a50694bf6e
@ -85,6 +85,8 @@ async def document_upload(
|
|||||||
print(f"/document/upload params: {space_name}")
|
print(f"/document/upload params: {space_name}")
|
||||||
try:
|
try:
|
||||||
if doc_file:
|
if doc_file:
|
||||||
|
if not os.path.exists(os.path.join(KNOWLEDGE_UPLOAD_ROOT_PATH, space_name)):
|
||||||
|
os.makedirs(os.path.join(KNOWLEDGE_UPLOAD_ROOT_PATH, space_name))
|
||||||
with NamedTemporaryFile(
|
with NamedTemporaryFile(
|
||||||
dir=os.path.join(KNOWLEDGE_UPLOAD_ROOT_PATH, space_name), delete=False
|
dir=os.path.join(KNOWLEDGE_UPLOAD_ROOT_PATH, space_name), delete=False
|
||||||
) as tmp:
|
) as tmp:
|
||||||
|
Loading…
Reference in New Issue
Block a user